make Err type Error method a pointer receiver to avoid panics with uncomparable types
minimum code to reproduce this bug with the existing master branch Err implementation
package main
import (
"log"
"github.com/matryer/vice"
"github.com/pkg/errors"
)
func main() {
err := vice.Err{Name: "foo", Err: errors.New("foo bar")}
comp(&err) // alls well
comp(err) // craps the bed here with uncompareable type panic
}
func comp(err error) {
cause := errors.Cause(err)
if cause != err {
log.Println("foo bar")
}
}
make Err type Error method a pointer receiver to avoid panics with uncomparable types
minimum code to reproduce this bug with the existing master branch Err implementation