mirror of https://github.com/knative/func.git
fix: lint issues
This commit is contained in:
parent
1e3959c045
commit
895872aee7
|
@ -68,9 +68,9 @@ func (fsys FS) Open(name string) (fs.File, error) {
|
|||
// Note that file can be nil here: the map need not contain explicit parent directories for all its files.
|
||||
// But file can also be non-nil, in case the user wants to set metadata for the directory explicitly.
|
||||
// Either way, we need to construct the list of children of this directory.
|
||||
var list []fileInfo
|
||||
var elem string
|
||||
var need = make(map[string]bool)
|
||||
list := []fileInfo{}
|
||||
elem := ""
|
||||
need := make(map[string]bool)
|
||||
if name == "." {
|
||||
elem = "."
|
||||
for fname, f := range fsys {
|
||||
|
|
|
@ -169,7 +169,7 @@ func readDir(src string, files fs.FS) ([]fs.DirEntry, error) {
|
|||
}
|
||||
|
||||
if !fi.IsDir() {
|
||||
return nil, errors.New(fmt.Sprintf("%v must be a directory", fi.Name()))
|
||||
return nil, fmt.Errorf("%v must be a directory", fi.Name())
|
||||
}
|
||||
list, err := f.(fs.ReadDirFile).ReadDir(-1)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue