-
Notifications
You must be signed in to change notification settings - Fork 11
Go Rewrite: Getting Started
-
go1.12 or higher - That's it (for now)
go has good support for every OS, you should have no trouble finding a binary for a relatively modern OS.
-
Make a gocode directory. I recommend
mkdir ~/.gocodeso it's out of the way. This will be your$GOPATH. -
Find where go is installed using
whereis go. You want to use the one that's a directory. In the following example,/usr/lib/gowould be your$GOROOT.
$ whereis go
go: /usr/bin/go /usr/lib/go /usr/lib/go/bin/go
$ file /usr/lib/go
/usr/lib/go: directory
- Set your exports in your shell's rc file:
export GOROOT="{see above}"
export GOPATH="{see above}"- Get the repo and dependencies
mkdir $HOME
git clone {this repo} && cd {this repo}
go get- That's it!
go comes with a very clean and powerful standard toolkit, making it easier to wrangle dependencies for small-medium scale projects so you can focus on coding.
The default dependency management tool is go mod and uses 2 files: go.mod (the dependencies) and go.sum (a checksum to verify dependencies).
Do not change dependencies unless you know what you're doing!
glhf; ping me in Discord (YourselfAU) if you're actually interested in contributing and somehow have the time for it.