That error is caused by attempting to import a program as though it were a package. The package golang.org/x/tools/cmd/stringer should be installed with the go get command rather than imported directly in code.