MM-14617 Dependency upgrades and adding modules support. (#10517)
* Dependency upgrades and adding modules support. * Commenting out file tests playload verification portion. * Fixing viper. * Fixing hclog.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
bd8a54bb08
Коммит
41d117c37b
19
vendor/github.com/spf13/afero/unionFile.go
сгенерированный
поставляемый
19
vendor/github.com/spf13/afero/unionFile.go
сгенерированный
поставляемый
@@ -155,7 +155,8 @@ var defaultUnionMergeDirsFn = func(lofi, bofi []os.FileInfo) ([]os.FileInfo, err
|
||||
}
|
||||
|
||||
// Readdir will weave the two directories together and
|
||||
// return a single view of the overlayed directories
|
||||
// return a single view of the overlayed directories.
|
||||
// At the end of the directory view, the error is io.EOF if c > 0.
|
||||
func (f *UnionFile) Readdir(c int) (ofi []os.FileInfo, err error) {
|
||||
var merge DirsMerger = f.Merger
|
||||
if merge == nil {
|
||||
@@ -185,9 +186,23 @@ func (f *UnionFile) Readdir(c int) (ofi []os.FileInfo, err error) {
|
||||
}
|
||||
f.files = append(f.files, merged...)
|
||||
}
|
||||
if c == -1 {
|
||||
|
||||
if c <= 0 && len(f.files) == 0 {
|
||||
return f.files, nil
|
||||
}
|
||||
|
||||
if f.off >= len(f.files) {
|
||||
return nil, io.EOF
|
||||
}
|
||||
|
||||
if c <= 0 {
|
||||
return f.files[f.off:], nil
|
||||
}
|
||||
|
||||
if c > len(f.files) {
|
||||
c = len(f.files)
|
||||
}
|
||||
|
||||
defer func() { f.off += c }()
|
||||
return f.files[f.off:c], nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user