From 76a232c33cf92ac511f55b0fc1e72a5ec46bf3d7 Mon Sep 17 00:00:00 2001 From: "Brian,Kun Liu" Date: Wed, 30 Oct 2024 02:12:49 +0800 Subject: [PATCH] goenv: add page (#14303) Co-authored-by: Wiktor Perskawiec Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Juri Dispan --- pages/common/goenv.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/goenv.md diff --git a/pages/common/goenv.md b/pages/common/goenv.md new file mode 100644 index 000000000..190eb6576 --- /dev/null +++ b/pages/common/goenv.md @@ -0,0 +1,33 @@ +# goenv + +> Install, uninstall or switch between Golang versions. +> Supports version numbers like "1.16.15" or "1.22.8" etc. +> More information: . + +- List all available goenv commands: + +`goenv commands` + +- Install a specific version of Golang: + +`goenv install {{go_version}}` + +- Use a specific version of Golang in the current project: + +`goenv local {{go_version}}` + +- Set the default Golang version: + +`goenv global {{go_version}}` + +- List all available Golang versions and highlight the default one: + +`goenv versions` + +- Uninstall a given Go version: + +`goenv uninstall {{go_version}}` + +- Run an executable with the selected Go version: + +`goenv exec go run {{go_version}}`