Go: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<syntaxhighlight lang= | {|class='wikitable' | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
# possibility of conflict with minikube ⚠️ | # possibility of conflict with minikube ⚠️ | ||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
| Line 12: | 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' | ||
| colspan= | !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 | mkdir -p /opt/${USER}/chorke/academia/var/playground/go | ||
ls -lah /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 | ln -s /opt/${USER}/chorke/academia/var/playground/go ${HOME}/Documents/go-playground | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |||
| valign= | |valign='top' style='width:50%'| | ||
<syntaxhighlight lang= | <syntaxhighlight lang='bash'> | ||
ls -lah ${HOME}/Documents/go-playground/ | ls -lah ${HOME}/Documents/go-playground/ | ||
cd ${HOME}/Documents/go-playground/ | cd ${HOME}/Documents/go-playground/ | ||
| Line 29: | Line 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
<syntaxhighlight lang='bash'> | |||
| valign= | |||
<syntaxhighlight lang= | |||
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 47: | 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] | ||
| Line 76: | Line 71: | ||
* [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 93: | Line 85: | ||
* [[Helm]] | * [[Helm]] | ||
|valign= | |valign='top'| | ||
|valign='top'| | |||
|- | |- | ||
|valign='top'| | |||
|valign= | |||
* [[Linux Containers]] | * [[Linux Containers]] | ||
* [[PostgreSQL]] | * [[PostgreSQL]] | ||
| Line 113: | Line 101: | ||
* [[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 125: | Line 113: | ||
* [[K8s]] | * [[K8s]] | ||
|valign= | |valign='top'| | ||
* [[Ruby on Rails]] | * [[Ruby on Rails]] | ||
* [[JavaScript]] | * [[JavaScript]] | ||
| Line 134: | Line 122: | ||
* [[Java]] | * [[Java]] | ||
* [[Lua]] | * [[Lua]] | ||
|} | |} | ||
Revision as of 03:22, 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 | ||
|---|---|---|