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:
parent
4255b87aba
commit
bc6cffde61
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user