GO-ENV(1)

✨ NAME ✨

go-env β€” print Go environment information 🫢

(it's the go env command, bestie, and yes she's iconic β€” this page lives in the Go programming tools and commands manual, section 1 πŸ’…)


🌸 SYNOPSIS 🌸

go env [-json] [-changed] [-u] [-w] [var ...]

πŸŽ€ DESCRIPTION πŸŽ€

Env prints Go environment information. That's the whole vibe. ✨

By default env prints information as a shell script β€” and on Windows, a batch file, because Windows has to be different, it's giving main character energy on a platform nobody asked for πŸ™ˆ

But okay so β€” if you give it one or more variable names as arguments? Then env prints the value of each named variable on its own line. Clean. Simple. Slay. πŸ’…

Now the flags, bestie, listen up:

  • -json β€” prints the environment in JSON format instead of as a shell script 🌈 (yes, for the people who want to jq it later, iykyk)
  • -u β€” this one requires one or more arguments and unsets the default setting for the named environment variables, if one has been set with go env -w. No argument, no unset, periodt. πŸ’€
  • -w β€” also requires one or more arguments, but these have to be in the form NAME=VALUE, and it changes the default settings of the named environment variables to the given values. Like a little glow-up for your defaults πŸ”₯
  • -changed β€” prints only those settings whose effective value differs from the default value that would be obtained in an empty environment with no prior uses of the -w flag πŸ¦‹ (i.e. only the stuff you actually messed with, obsessed)
For more about environment variables, see go help environment. Not me telling you there's a whole other manual for this β€” go read it fr fr πŸ“–

πŸ‘‘ AUTHOR πŸ‘‘

This manual page was created using help2man and afterwards updating the output. It is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org> for the Debian project (and may be used by others). Shoutout to the team, they really carried this 🫢


and that's the whole page, bestie β€” written, checked, and factually untouched πŸ’– this was Go 1.27, dated August 2026, and it's giving GO-ENV(1) in that good good Go programming tools and commands energy. bye, go run something iconic ✨🧚

πŸ“¦ where this page comes from