I'm calling the method with error type value (foo() in code example). I don't care this result. What's the rigth code style way to write? Errcheck linter makes me check this error.
//for example, same method may be called from imported entity
func foo() error {
if err := someFunction(); err != nil {
return err
}
return nil
}
func process() {
//linter doesn't like this
foo()
//this way leads to unused variable error
err := foo()
//is this clean way?
_ = foo()
return
}