go-spew fails with withmock utility - UnsafeDisabled redeclared in this block · Issue #50 · qur/withmock · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ withmock go test
ERROR: Failed to install 'github.com/project/db': exit status 2
output:
# github.com/davecgh/go-spew/spew
../../../github.com/davecgh/go-spew/spew/bypasssafe.go:8: UnsafeDisabled redeclared in this block
previous declaration at ../../../github.com/davecgh/go-spew/spew/bypass.go:11
../../../github.com/davecgh/go-spew/spew/bypasssafe.go:11: unsafeReflectValue redeclared in this block
previous declaration at ../../../github.com/davecgh/go-spew/spew/bypass.go:57
I commented on the linked issue, but I'll post it here too for visibility.
My guess based on the error message is that this project is incorrectly ignoring the build tags. Spew uses build tags to allow different compile time behavior for the constants in question.
In particular: bypass.go has // +build !appengine,!disableunsafe bypasssafe.go has // +build appengine disableunsafe.
The error message clearly shows that both files are incorrectly being compiled.
More info: davecgh/go-spew#39
The text was updated successfully, but these errors were encountered: