mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Misspell warnings fix (#2001)
This commit is contained in:
parent
0d3a9c9438
commit
ce7d5eddbc
@ -86,7 +86,7 @@ func generateBytesData(size int) []byte {
|
|||||||
b = letterBytes[rand.Intn(len(letterBytes))]
|
b = letterBytes[rand.Intn(len(letterBytes))]
|
||||||
return []byte{b}
|
return []byte{b}
|
||||||
}
|
}
|
||||||
// repeat the random character choosen size
|
// repeat the random character chosen size.
|
||||||
return bytes.Repeat(getRandomByte(), size)
|
return bytes.Repeat(getRandomByte(), size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ func getOrderedDisks(distribution []int, disks []StorageAPI, blockCheckSums []ch
|
|||||||
return orderedDisks, orderedBlockCheckSums
|
return orderedDisks, orderedBlockCheckSums
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return readable disks slice from which we can read parallely.
|
// Return readable disks slice from which we can read parallelly.
|
||||||
func getReadDisks(orderedDisks []StorageAPI, index int, dataBlocks int) (readDisks []StorageAPI, nextIndex int, err error) {
|
func getReadDisks(orderedDisks []StorageAPI, index int, dataBlocks int) (readDisks []StorageAPI, nextIndex int, err error) {
|
||||||
readDisks = make([]StorageAPI, len(orderedDisks))
|
readDisks = make([]StorageAPI, len(orderedDisks))
|
||||||
dataDisks := 0
|
dataDisks := 0
|
||||||
@ -146,7 +146,7 @@ func erasureReadFile(writer io.Writer, disks []StorageAPI, volume string, path s
|
|||||||
bitRotVerify := func() func(diskIndex int) bool {
|
bitRotVerify := func() func(diskIndex int) bool {
|
||||||
verified := make([]bool, len(orderedDisks))
|
verified := make([]bool, len(orderedDisks))
|
||||||
// Return closure so that we have reference to []verified and
|
// Return closure so that we have reference to []verified and
|
||||||
// not recalculate the hash on it everytime the function is
|
// not recalculate the hash on it every time the function is
|
||||||
// called for the same disk.
|
// called for the same disk.
|
||||||
return func(diskIndex int) bool {
|
return func(diskIndex int) bool {
|
||||||
if verified[diskIndex] {
|
if verified[diskIndex] {
|
||||||
|
@ -152,7 +152,7 @@ func getEncodedBlockLen(inputLen int64, dataBlocks int) (curEncBlockSize int64)
|
|||||||
// err == nil, not err == EOF. Additionally offset can be provided to start
|
// err == nil, not err == EOF. Additionally offset can be provided to start
|
||||||
// the read at. copyN returns io.EOF if there aren't enough data to be read.
|
// the read at. copyN returns io.EOF if there aren't enough data to be read.
|
||||||
func copyN(writer io.Writer, disk StorageAPI, volume string, path string, offset int64, length int64) (err error) {
|
func copyN(writer io.Writer, disk StorageAPI, volume string, path string, offset int64, length int64) (err error) {
|
||||||
// Use 128KiB staging buffer to read upto length.
|
// Use 128KiB staging buffer to read up to length.
|
||||||
buf := make([]byte, readSizeV1)
|
buf := make([]byte, readSizeV1)
|
||||||
|
|
||||||
// Read into writer until length.
|
// Read into writer until length.
|
||||||
|
@ -168,7 +168,7 @@ func (n networkStorage) StatFile(volume, path string) (fileInfo FileInfo, err er
|
|||||||
return fileInfo, nil
|
return fileInfo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadAll - reads entire contents of the file at path until EOF, retuns the
|
// ReadAll - reads entire contents of the file at path until EOF, returns the
|
||||||
// contents in a byte slice. Returns buf == nil if err != nil.
|
// contents in a byte slice. Returns buf == nil if err != nil.
|
||||||
// This API is meant to be used on files which have small memory footprint, do
|
// This API is meant to be used on files which have small memory footprint, do
|
||||||
// not use this on large files as it would cause server to crash.
|
// not use this on large files as it would cause server to crash.
|
||||||
|
Loading…
Reference in New Issue
Block a user