voidint / g Goto Github PK
View Code? Open in Web Editor NEWGolang Version Manager
Home Page: https://pkg.go.dev/github.com/voidint/g
License: MIT License
Golang Version Manager
Home Page: https://pkg.go.dev/github.com/voidint/g
License: MIT License
language: go
sudo: false
go:
- master
before_install:
- go get github.com/mattn/goveralls
script:
- GOOS=darwin go build
- GOOS=windows go build
- GOOS=linux go build
- $HOME/gopath/bin/goveralls -service=travis-ci
这个是什么原因
G_HOME
G_HOME
值为空,则读取默认路径~/.g
尝试了下在树莓派上用这个工具,遇到的一个问题,install
的时候,下载的不是ARM版本的,执行go的时候报错
pi@raspberrypi:~ $ go version
-bash: /home/pi/.g/go/bin/go: cannot execute binary file: Exec format error
我是在Windows上交叉编译了g
的源码,然后上传到树莓派上
[g] Rename C:\Users\username\.g\versions\go C:\Users\username\.g\versions\1.12: Access is denied.
zip
压缩包。#14g
安装go版本。http://www.maxi-pedia.com/mklink若未安装任何go版本,应该提示No version installed yet
。
$ tree -L 2 ~/.g
/Users/voidint/.g
├── downloads
│ ├── go1.11.9.darwin-amd64.tar.gz
│ └── go1.12.4.darwin-amd64.tar.gz
├── go -> /Users/voidint/.g/versions/1.12.4
└── versions
├── 1.12.4
└── 1.8.1
[g] file checksum does not match the computed checksum
。[g] File checksum does not match the computed checksum
。rt
~/.g/versions/
目录下的所有子目录想问下大佬支持多gopath的管理吗, 我使用的go1.14的protobuf的插件是安装在gopath的bin目录下的, 然后我是直接将这个gopath的bin目录添加到了PATH下, 这样相当于切换不同的go版本如果需要gopath的相关工具都需要手动指定。想问下g可以进行相关的管理吗
以前安装没有问题,最近需要使用时,报了上述错误。
通过浏览器窗口可以下载压缩包。
Hi~,我通过g的方式去安装的Go,然后在Goalnd debug程序的时候,窗口显示是:Frame is not available。然后我卸载g已经环境变量之后,用go官方的exe安装包,同样的程序,同样的位置debug的时候,能够正常暂停,并显示变量。
不知道有没有遇到过这样的情况呢?
输出的内容包括:
g ls-remote
将输出所有已知的go版本g ls-remote stable
将输出维护中的稳定go版本列表g ls-remote archived
将输出已归档的go版本列表使用go
的windows
安装器安装了1.15,但是 g ls
没有检测到.是否与windows
安装器不兼容.二者只能取一?
ctrl+c
)这个是我近段时间思考要做的一个轮子,没想到已经有大佬做出来了,准备下载看看大佬的实现
部分 go 相关工具会生成 bin 文件,要向其它语言一样隔离各个环境最好 gopath/bin 也能隔离,gopath/bin 也用软链接,只是更新链接后,新环境并不会自动编译,也许可以按 pipenv 的思路按工程生成 gopath,只是因为最后链接到同一个位置,同时打开多个工程会相互干扰
g version 1.1.2
build: 2020-05-05T15:23:28+08:00
branch: master
commit: c243baa
$ echo $G_MIRROR;
https://golang.google.cn/dl/
$ g install 1.14.4
[g] Installation package(/dl/go1.14.4.darwin-amd64.tar.gz) download failed ==> Get "/dl/go1.14.4.darwin-amd64.tar.gz": unsupported protocol scheme ""
Hi
一直 install 都报这个错误,但是可以通过 g ls-remote 看到这个版本,报错信息如上 unsupported protocol scheme
~/.g/versions/<version>
目录是否存在~/.g/go
链接~/.g/go
多版本管理最主要的功能之一就是实验新特性,通过增加go未发布的实验版本,可以进行相关的特性实验,比如增加go version 1.18 可以进行工作区和泛型的相关实验。
$ g install 1.11.9
[g] open /Users/voidint/.g/downloads/go1.11.9.darwin-amd64.tar.gz: no such file or directory
我直接执行64位的安装程序没有用,也不知道怎么删除已经安装的32位的,求大佬们帮助!!感谢!!!!
~/.g/downloads/
是否包含目标版本的安装包
SHA256 Checksum
并与官方站点上的值进行比较。
SHA256 Checksum
值不相等,删除本地目标版本安装包,从官方站点下载安装包至~/.g/downloads/
目录。~/.g/downloads/
目录。~/.g/versions
目录,并将~/.g/versions/go
目录重命名为~/.g/versions/${版本号}
。~/.g/go
。你好,目前ls-remote只能列出版本号,但是没有架构名称。 如果是直接安装16.2则为amd64的,希望能支持选择架构安装
$ g install 1.5.2
[g] file checksum does not match the computed checksum
运行命令:g install 1 会安装不成功,
`
g install 1
[g] Installation package not found
`
查看官网后发现是因为版本为1不是按照一般的命名规范进行命名。
$HOME/.go/bin
目录下$HOME/.go/env
文件内并在$HOME/.bashrc
文件内将其导入~/.g/downloads
目录下会存在一个下载未完全的安装包。~/.g/downloads
目录下已经存在一个与预期相同的安装包文件,g会跳过下载步骤,直接开始校验该安装包的校验和,由于该安装包不完整,校验和与预期不一致。设置了G_MIRROR https://golang.google.cn/dl/ 后,是可以正常查询,但是下载还是从官方地址下载,造成无法正常install。
出错信息:
[g] Installation package(https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz) download failed ==> local error: tls: bad record MAC
os.Readlink("/proc/self/exe")
exec.LookPath("g")
方式可能并不准确,因为依赖于PATH
环境变量。${HOME}/.g/downloads
目录下的压缩包文件可以参考这个项目的一些功能: https://github.com/moovweb/gvm
https://golang.org/dl/
,默认从此网址读取版本信息。G_MIRROR
环境变量指定镜像地址,这对于**大陆这类网络自由受到一定限制的地区有一定意义。已知的镜像地址:https://golang.google.cn/dl/
。$ g ls
1.5.4
1.6.4
1.7.6
1.8.1
1.8.7
1.9.7
* 1.11.10
1.12.5
Symlink F:\go_bin\versions\1.15.13 : A required privilege is not held by the client.
~/.g/versions
目录下包含目标版本的目录~/.g/versions
目录下目标版本目录目前 go 最新的官网为:https://go.dev/
下载地址为:https://go.dev/dl/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.