canha / golang-tools-install-script Goto Github PK
View Code? Open in Web Editor NEWSimple Bash script to automate Go language tools single user installation or even removal.
License: Apache License 2.0
Simple Bash script to automate Go language tools single user installation or even removal.
License: Apache License 2.0
With new Implementation of FISH Shell support in PR #34 we need to implement FISH testing support in Travis CI.
Hey thanks for putting this together. Wanted to let you know about a bug that exists when the profile file (e.g. .zshrc
doesn't have a trailing newline. This script writes Go path variables to the end like so:
# GoLang
export GOROOT=/Users/user/.go
export PATH=$GOROOT/bin:$PATH
export GOPATH=/Users/user/go
export PATH=$GOPATH/bin:$PATH
Say there's no trailing newline in that file and the last line happens to be something like:
export NODE_OPTIONS="--max-old-space-size=16000"
That results in this script writing:
export NODE_OPTIONS="--max-old-space-size=16000"# GoLang
export GOROOT=/Users/user/.go
export PATH=$GOROOT/bin:$PATH
export GOPATH=/Users/user/go
export PATH=$GOPATH/bin:$PATH
Which will cause a bad option
error for any node apps launching from the console. That likely affects other variables at the end as well.
uname -m
for this OS gives me i686
.
But since there is no https://go.dev/dl/go1.18.1.linux-i686.tar.gz, the download and installation failed.
Upon installing golang via snap, the go ver
showed me that it is actually 386
architecture.
So are they both the same ๐ค
Anyhow, I removed the snap version, manually set arch to 386
and ran the script and everything is working as expected.
Line 58: mkdir -p "$HOME/go/{src,pkg,bin}"
This actually produces a folder at ~/go/ called "{src,pkg,bin}", not three separate folders.
I suggest changing the line to:
for folder in {src,pkg,bin};do mkdir -p ${folder};done
Can we add source $shell_profile at the end of the script to remove this manual step to be handled by user ?
Hello this is a great script but I have a fundamental question.
I see the script sets GOROOT="$HOME/.go"
for the install dir and GOROOT
variable.
According to docs "This is usually" /usr/local/go
Why this difference?
When removing the Go, shouldn't the script handle the $GOPATH and remove it automatically which would be $HOME/go because in the current script when we reinstall it asks to delete $GOPATH manually?
The readme should have a section for how to use --version when piping to bash.
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \ | bash -s -- --version 1.13.1
It would be useful if I can add another argument to install the latest go version. I.e. --version latest
Hello, i made this changes for working right in Raspberry Pi:
"armv7")
ARCH=armv6l
;;
"armv7l")
ARCH=armv6l
;;
Go 1.19 is released!
Hi ,canha
i run your script to setup go in my ubuntu machine . i'm just trying to check go version from konsole
but it showing command not found and how can i run my first program in go please help me regrading this
I love this script. I've been using it for years. But today (and some other times also) I get a 403 Forbidden error while tring to execute it on my Debian 11 VPS:
`yamn@debian:~/golang-tools-install-script-master$ bash goinstall.sh
Downloading go1.20.6.linux-amd64.tar.gz ...
--2023-11-09 10:45:18-- https://storage.googleapis.com/golang/go1.20.6.linux-amd64.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 2a00:1450:400e:80f::201b, 2a00:1450:400e:811::201b, 2a00:1450:400e:805::201b, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|2a00:1450:400e:80f::201b|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2023-11-09 10:45:18 ERROR 403: Forbidden.`
Can you help?
SEC3
$> curl -L https://git.io/vQhTU | bash
$> source /root/.bashr
$> go get -u github.com/cli/cli
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/cli/cli: exec: "git": executable file not found in $PATH
maybe a message would be enough tho
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.