1
1
mirror of https://github.com/wader/fq.git synced 2024-12-23 21:31:33 +03:00

lint,decode,fuzz:: Fix nilerr warnings, one real one should be ignored for now

This commit is contained in:
Mattias Wadman 2022-08-01 18:47:24 +02:00
parent 4255b87aba
commit bc6cffde61
2 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func FuzzFormats(f *testing.F) {
return nil
}
if st, err := os.Stat(path); err != nil || st.IsDir() {
return nil
return err
}
b, readErr := ioutil.ReadFile(path)

View File

@ -258,6 +258,7 @@ func (i *Interp) _decode(c any, format string, opts decodeOpts) any {
if len(opts.Remain) > 0 {
if err := mapstruct.ToStruct(opts.Remain, &inArg); err != nil {
// TODO: currently ignores failed struct mappings
//nolint: nilerr
return f.DecodeInArg, nil
}
}