gvm

command module
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

gvm

golang version manage

quick start

docker run -it jaronnie/gvm:v1.4.1 bash
gvm install go1.20
gvm activate go1.20

init

gvm init
# gvm init <shellType>

auto completion

zsh:
# echo "autoload -U compinit; compinit" >> ~/.zshrc
gvm completion zsh > "${fpath[1]}/_gvm"

linux bash:
gvm completion bash > /etc/bash_completion.d/gvm

install go

# will install go 1.18
gvm install go1.18

# will install go 1.18.5 version
gvm install go1.18.5

# install offline, default package file path is ~/gvm
gvm install go1.18.5 --offline

# install offline, package file path is .
gvm install go1.18.5 --offline -p .

list

# list local go
gvm list

# list remote go
gvm list --remote

# list remote go with limit number
gvm list --remote -n 100

# list all
gvm list --remote --all

activate go

# will activate go 1.18 environment
gvm activate go1.18

uninstall go

gvm uninstall go1.18.5

QA

download go package error
gvm config --registry https://mirrors.aliyun.com/golang
bash completion error: bash: _get_comp_words_by_ref: command not found
# centos
yum -y install bash-completion
gvm init: Error: can not get shell type
# gvm init <shellType>
gvm init bash

todo

  • support windows

Documentation

Overview

Copyright © 2023 jaronnie jaron@jaronnie.com

Directories

Path Synopsis
internal
vm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL