HasPrefix doesn't have side effects and its return value is ignored
824 if err == nil {
825 state.tagWV = true
826 }
827 case strings.HasPrefix(line, "#"):828 // comments are ignored
829 }
830 return err
HasPrefix doesn't have side effects and its return value is ignored
439 state.variant.HDCPLevel = v
440 }
441 }
442 case strings.HasPrefix(line, "#"):443 // comments are ignored
444 }
445 return err
Description
Return value of a pure function the value should always be handled else, calling the function is pointless. If the return value is not required, it is recommended to remove the function call.
Bad practice
strings.Replace("", "", "", 1) // return value is discarded
f := foo(1)
Recommended
f := foo(1)