Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stringer command not found #43590

Closed
Nurs717 opened this issue Jan 8, 2021 · 4 comments
Closed

stringer command not found #43590

Nurs717 opened this issue Jan 8, 2021 · 4 comments

Comments

@Nurs717
Copy link

Nurs717 commented Jan 8, 2021

What version of Go are you using (go version)?

$ go version
1.15.6

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/admin/Library/Caches/go-build"
GOENV="/Users/admin/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/admin/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/admin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/54/ty3x9l1s18jb2hnjr4ymw0xr0000gn/T/go-build689003330=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

when i'm trying to use stringer package with command stringer -type=Pill
this occurs zsh: command not found: stringer
am I doing right?

What did you expect to see?

creating new file pill_stringer.go

What did you see instead?

zsh: command not found: stringer

@AlexRouSg
Copy link
Contributor

AlexRouSg commented Jan 8, 2021

If you installed stringer with go get the binary is placed into ${HOME}/go/bin this location is not in the normal search location for programs/commands (i.e. the ${PATH} env variable).

To call it from the terminal without putting the full path, you would have to change your ${PATH} env variable to include ${HOME}/go/bin

@Nurs717
Copy link
Author

Nurs717 commented Jan 8, 2021

can u please give step by step instruction or link how to do it. I'm new at it and can't catch it properly. thx

@AlexRouSg
Copy link
Contributor

Search for osx set path environment variable

As this is not a bug, please see https://github.com/golang/go/wiki/Questions if you need more help than that.

@mvdan
Copy link
Member

mvdan commented Jan 8, 2021

What @AlexRouSg said. The issue tracker is not for questions.

@mvdan mvdan closed this as completed Jan 8, 2021
@golang golang locked and limited conversation to collaborators Jan 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants