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
If you reference $PWD in a go:generate comment, it will be the directory the user ran go generate in, instead of the directory the go:generate comment.
It makes some workarounds for getting some prickly-about-paths commands harder to get right without making some assumptions about where go generate will be run.
The text was updated successfully, but these errors were encountered:
Working as documented. cmd/go replaces $PWD (and other environment
variables) according to its environment, and so it will be replaced with
the directory that go generate is run.
Why not just use . to pass the package path to a command?
This was for use with protoc which has its own, different rules about how you import other .proto files and I was trying to reconcile them. Using relative paths and the such give it a hard time.
My
go version
is go1.6.2 darwin/amd64If you reference
$PWD
in ago:generate
comment, it will be the directory the user rango generate
in, instead of the directory thego:generate
comment.It makes some workarounds for getting some prickly-about-paths commands harder to get right without making some assumptions about where
go generate
will be run.The text was updated successfully, but these errors were encountered: