Go: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
==Playground== | ==Playground== | ||
{| | {| | ||
| colspan="2" | | |||
<syntaxhighlight lang="bash"> | |||
mkdir -p /opt/${USER}/chorke/academia/var/playground/go | |||
ls -lah /opt/${USER}/chorke/academia/var/playground/go | |||
ln -s /opt/${USER}/chorke/academia/var/playground/go ${HOME}/Documents/go-playground | |||
</syntaxhighlight> | |||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
ls -lah ${HOME}/Documents/go-playground/ | |||
cd ${HOME}/Documents/go-playground/ | |||
nano main.go | |||
</syntaxhighlight> | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 42: | Line 60: | ||
---- | ---- | ||
|- | |- | ||
| valign="top" | | | valign="top" | | ||
Revision as of 17:08, 25 November 2024
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y golang-1.23-go
EXE
cat << EXE | sudo bash
update-alternatives --install /usr/local/bin/go go /usr/lib/go-1.23/bin/go 1983
update-alternatives --install /usr/local/bin/gofmt gofmt /usr/lib/go-1.23/bin/gofmt 1983
EXE
export GOPATH=/usr/lib/go-1.23
export PATH=$PATH:$GOPATH/bin
Playground
mkdir -p /opt/${USER}/chorke/academia/var/playground/go
ls -lah /opt/${USER}/chorke/academia/var/playground/go
ln -s /opt/${USER}/chorke/academia/var/playground/go ${HOME}/Documents/go-playground
|
ls -lah ${HOME}/Documents/go-playground/
cd ${HOME}/Documents/go-playground/
nano main.go
| |
| ||
sudo apt purge -y golang-go
apt info golang-1.23-go
apt search golang-go
|
sudo update-alternatives --config go
update-alternatives --query gofmt
update-alternatives --query go
|
go version $(which gofmt)
go version
which go
|
| ||
References
| ||
| ||