1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00

goenv: add page (#14303)

Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
This commit is contained in:
Brian,Kun Liu 2024-10-30 02:12:49 +08:00 committed by GitHub
parent 0c99b8f754
commit 76a232c33c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

33
pages/common/goenv.md Normal file
View file

@ -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: <https://github.com/go-nv/goenv>.
- 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}}`