matryer / vice

Go channels at horizontal scale (powered by message queues)
https://medium.com/@matryer/introducing-vice-go-channels-across-many-machines-bcac1147d7e2
Apache License 2.0
1.54k stars 79 forks source link

fix uncomparable types panic bug when consuming the vice Err type from the errChan #50

Closed jsteenb2 closed 6 years ago

jsteenb2 commented 6 years ago

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")
    }
}
jsteenb2 commented 6 years ago

travis is broke on a tooling dependency atm

jsteenb2 commented 6 years ago

Any update on this?

jsteenb2 commented 6 years ago

@matryer any update here?

jsteenb2 commented 6 years ago

@matryer any update?

jsteenb2 commented 6 years ago

@matryer what's the word?