Open sighmin opened 10 years ago
@sighmin Cool idea. :smile:
@wfarr Here are a couple potential implementations:
open https://code.google.com/p/go/downloads/list
goenv/share/goenv
just like ruby-build
goenv install --list
powered by list_definitions
Thoughts? Thanks!
@wfarr I thought of a third option; it doesn't require extra files.
3.
Add and maintain an array of available binaries
libexec/goenv-install
, set array using platform
, arch
, and extra
Potential array implementation:
bash-3.2$ echo $platform
darwin
bash-3.2$ echo $arch
amd64
bash-3.2$ echo $extra
-osx10.8
bash-3.2$ VERSIONS["darwin_amd64_osx108"]="1.2.1 1.2"
bash-3.2$ VERSIONS["darwin_amd64_osx106"]="1.2.1 1.2"
bash-3.2$ key="${platform}_${arch}_$(echo ${extra} | tr -d '[:punct:]')"
bash-3.2$ echo $key
darwin_amd64_osx108
bash-3.2$ echo ${VERSIONS[$key]}
1.2.1 1.2
bash-3.2$ for version in `echo ${VERSIONS[$key]}`
> do
> echo $version
> done
1.2.1
1.2
Thanks for considering!
How's this? https://github.com/wfarr/goenv/pull/6
I went with the third version. Sorry if it's not leet I'm not a bash expert.
Thanks for getting this started dude.
It would be great to have a
--list
flag for thegoenv install
command o see what versions are available.