What steps will reproduce the problem?
Reported by f2f and alexluya on #go-nuts
package p
import (
"testing"
. "launchpad.net/gocheck"
. "code.google.com/p/gomock/gomock"
)
func Test(t *testing.T) { TestingT(t) }
What is the expected output? What do you see instead?
expected: Tests run
actual:
% go build issue.go
# command-line-arguments
./issue.go:6: Not redeclared during import
previous declaration during import
./issue.go:6: imported and not used: "code.google.com/p/gomock/gomock"
As it happens both gomock and gocheck define a function called Not, and as they are both
imported locally, they conflicted. The name of the function didn't help, but that is not
its fault.
The suggestion was to either quote the name of the function "Not", or if
possible give its full import path in the error message. The former sounds easier given
the offending line number is also available.
Please use labels and text to provide additional information.
I have a fix at http://golang.org/cl/6490082/
It only specifies which package import caused the error, but I think that is enough
context to make the error non-ambiguous.