Saturday, October 11, 2025
HomeGolangFirst Golang set up on Linux - Getting Assist

First Golang set up on Linux – Getting Assist


All of the references that I’ve discovered for Getting began with Golang are outdated. Is there a present getting began with Golang that somebody can level me to?

Thanks.

I discovered this “Go, from the start” final revealed 2022. This ought to be present sufficient.

I assume you’re began by now however in case you need to study extra in-depth with a lot of background-information on how Go works, verify this thread, particularly my very own suggestion: Please Advocate Some Enjoyable Paperback Introductions to Go – #10 by duckduck



1 Like

Generally – until you’ve bought particular causes to do in any other case – you need to simply use your distro’s package deal supervisor.

BTW: I’ve packaged 1.20 for Debian/Devuan: GitHub – metux/deb-pkg: Toolkit for constructing apt/yum utterly from sources
Have a look at the GH workflows for prebuilt debs/apt-repo, if you happen to don’t wanna run it your self.

(didn’t have the time to package deal newest launch)

I’ve all the time been curious concerning the totally different workflows utilized by totally different distro’s. So that you’re properly versed in debian packaging?

I’m into nixOS and nixpkgs though positively not but on the packaging-level.

Since my day by day driver is macOS, I discovered it best to only obtain the installer from https://go.dev/dl/ however I may also simply nix-shell -p go.

On my nixOS-playbox I’ve been experimenting with putting in totally different variations of Go without delay.
If nixOS you’ll be able to nix-shell -p go which is able to begin a brand new shell with that package deal put in.

That is what an instance shell-session seems like so you’ll be able to see how I put in totally different variations aspect by aspect, with just one unique model coming from the package deal supervisor (nixOSpkgs):

[nix-shell:~]$ go model
go model go1.19.9 linux/amd64

nix-shell:~]$ ls ~/go/bin
go1.15.7  go1.19.10  go1.20.9  go1.21.1  go1.21.2

[nix-shell:~]$ export PATH=~/go/bin:$PATH

[nix-shell:~]$ go1.21.2 model
go model go1.21.2 linux/amd64

[nix-shell:~]$ go set up golang.org/dl/go1.21.3@newest
go: downloading golang.org/dl v0.0.0-20231010164639-b8ab22880620

[nix-shell:~]$ ls ~/go/bin
go1.15.7  go1.19.10  go1.20.9  go1.21.1  go1.21.2  go1.21.3

[nix-shell:~]$ go1.21.3 model
go1.21.3: not downloaded. Run 'go1.21.3 obtain' to put in to ~/sdk/go1.21.3

[nix-shell:~]$ go1.21.3 obtain
Downloaded   0.0% (   16384 / 66641773 bytes) ...
Downloaded  13.4% ( 8945600 / 66641773 bytes) ...
Downloaded  55.7% (37142256 / 66641773 bytes) ...
Downloaded  97.7% (65109520 / 66641773 bytes) ...
Downloaded 100.0% (66641773 / 66641773 bytes)
Unpacking ~/sdk/go1.21.3/go1.21.3.linux-amd64.tar.gz ...
Success. You could now run 'go1.21.3'

[nix-shell:~]$ go1.21.3 model
go model go1.21.3 linux/amd64

[nix-shell:~]$ du -sh ~/sdk/go1.21.3
308M	~/sdk/go1.21.3

I’m unsure since which model go began to help this fashion of managing totally different variations.

BTW: One way or the other on this nixOS-box all of the older variations don’t work for me. Operating go1.20.9 model returns nothing (an empty line).

Anyway, this thread may perhaps flip into an fascinating dialogue about packaging go-related software program or the go-tool itself on totally different Linux/BSD-distro-flavors?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments