Go: Difference between revisions
Jump to navigation
Jump to search
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<syntaxhighlight lang= | {|class='wikitable' | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
# possibility of conflict with minikube ⚠️ | |||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
apt-get update;echo | apt-get update;echo | ||
apt list -a --upgradable | apt list -a --upgradable | ||
apt-get install -y golang-1.23-go | apt-get install -y golang-1.23-go | ||
update-alternatives --install /usr/local/bin/go go /usr/lib/go-1.23/bin/go 1983 | 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 | update-alternatives --install /usr/local/bin/gofmt gofmt /usr/lib/go-1.23/bin/gofmt 1983 | ||
| Line 14: | Line 14: | ||
export PATH=$PATH:$GOPATH/bin | export PATH=$PATH:$GOPATH/bin | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
|} | |||
==Playground== | ==Playground== | ||
{| | {|class='wikitable mw-collapsible' | ||
| valign= | !scope='col' style='text-align:left' colspan='2'| | ||
<syntaxhighlight lang= | Playground | ||
|- | |||
|valign='top' 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' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
ls -lah ${HOME}/Documents/go-playground/ | |||
cd ${HOME}/Documents/go-playground/ | |||
nano main.go | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
sudo apt purge -y golang-go | sudo apt purge -y golang-go | ||
apt info golang-1.23-go | apt info golang-1.23-go | ||
apt search golang-go | apt search golang-go | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |||
| valign= | |valign='top'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
sudo update-alternatives --config go | sudo update-alternatives --config go | ||
update-alternatives --query gofmt | update-alternatives --query gofmt | ||
| Line 31: | Line 50: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign= | |valign='top'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
go version $(which gofmt) | go version $(which gofmt) | ||
go version | go version | ||
which go | which go | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |||
==References== | |||
{|class='wikitable mw-collapsible' | |||
!scope='col' style='text-align:left' colspan='3'| | |||
References | |||
|- | |- | ||
|valign='top' style='width:33%'| | |||
| valign= | |||
* [https://gist.github.com/ReSearchITEng/a7e9202131118a321b33afe2e2c663fc Go » Update Alternatives » Ubuntu] | * [https://gist.github.com/ReSearchITEng/a7e9202131118a321b33afe2e2c663fc Go » Update Alternatives » Ubuntu] | ||
* [https://gist.github.com/bench/a61a7d376ac49761b27a Go » Update Alternatives » Alpine] | * [https://gist.github.com/bench/a61a7d376ac49761b27a Go » Update Alternatives » Alpine] | ||
* [https://medium.com/hprog99/getting-started-with-go-installation-setup-and-your-first-hello-world-program-fbfe940afae7 Go » Getting Started] | * [https://medium.com/hprog99/getting-started-with-go-installation-setup-and-your-first-hello-world-program-fbfe940afae7 Go » Getting Started] | ||
* [https://github.com/fission/examples/tree/master/go Go » K8s » Fission] | * [https://github.com/fission/examples/tree/master/go Go » K8s » Fission] | ||
* [https://help.sonatype.com/en/go-repositories.html Go » Nexus] | |||
* [https://go.dev/doc/install Go » Install] | * [https://go.dev/doc/install Go » Install] | ||
* [https://go.dev/ Go] | * [https://go.dev/ Go] | ||
|valign= | |valign='top' style='width:34%'| | ||
|valign= | |valign='top' style='width:33%'| | ||
|- | |- | ||
|valign='top'| | |||
|valign= | |||
* [[Helm/PostgreSQL|Helm » PostgreSQL]] | * [[Helm/PostgreSQL|Helm » PostgreSQL]] | ||
* [[Helm/MariaDB|Helm » MariaDB]] | * [[Helm/MariaDB|Helm » MariaDB]] | ||
| Line 78: | Line 86: | ||
* [[Helm]] | * [[Helm]] | ||
|valign= | |valign='top'| | ||
|valign='top'| | |||
|- | |- | ||
|valign='top'| | |||
|valign= | |||
* [[Linux Containers]] | * [[Linux Containers]] | ||
* [[PostgreSQL]] | * [[PostgreSQL]] | ||
| Line 98: | Line 102: | ||
* [[Port]] | * [[Port]] | ||
|valign= | |valign='top'| | ||
* [[Cloud Computing Cost]] | * [[Cloud Computing Cost]] | ||
* [https://www.cloudflare.com/products/tunnel/ Tunnel » Cloudflare] | * [https://www.cloudflare.com/products/tunnel/ Tunnel » Cloudflare] | ||
| Line 110: | Line 114: | ||
* [[K8s]] | * [[K8s]] | ||
|valign= | |valign='top'| | ||
* [[Ruby on Rails]] | * [[Ruby on Rails]] | ||
* [[JavaScript]] | * [[JavaScript]] | ||
| Line 119: | Line 123: | ||
* [[Java]] | * [[Java]] | ||
* [[Lua]] | * [[Lua]] | ||
|} | |} | ||
Latest revision as of 14:31, 6 March 2026
# possibility of conflict with minikube ⚠️
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y golang-1.23-go
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
|
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
|
References | ||
|---|---|---|