The Go Programming Language (golang)

cf

Installation

Follow macOS instructions here (or just use homebrew).

go run main.go
go build system.go

Local doc. : godoc -http=:6060

go & Heroku

go install github.com/rikwatson/hello

The above command will put an executable command named hello (or hello.exe) inside the bin directory of your workspace. Execute the command to see the greeting:

$GOPATH/bin/hello
hello, world

Environment variables

TODO: Stuff here about $HOME etc. Setting up for development.

echo 'export GOPATH=$HOME' >> $HOME/.profile
source $HOME/.profile
go env | grep GOPATH
GOPATH="/Users/myusername"
export GOPATH=~/Dropbox/go # /Volumes/MICROSD/go
mkdir -p $GOPATH
cd $GOPATH
mkdir -p $GOPATH/src
mkdir -p $GOPATH/src/github.com/raul
mkdir -p $GOPATH/src/github.com/raul/hello-go
cd !$
wget https://gist.github.com/raul/c168e41b78e23414c3b0/raw/hello.go
cat hello.go
go install . # No output means a successful compilation
ls $GOPATH/bin
$GOPATH/bin/hello-go
export PATH=$GOPATH/bin:$PATH  ####### < Add this TODO
mkdir -p $GOPATH/src/github.com/raul/hello-package
cd !$
wget https://gist.github.com/raul/345d9443b97ac394f590/raw/hello.go
cat hello.go
go build .
go install .
ls $GOPATH/pkg/darwin_amd64/github.com/raul/hello-package.a

cd $GOPATH/src/github.com/raul/hello-go
wget -N https://gist.github.com/raul/9e46c9f1d6e4bcd9df96/raw/hello.go
cat hello.go

go install .
hello-go

A Music Player in Go

Go App Engine

Download from here, unzip & then:

export PATH=/path/to/go_appengine:$PATH

Also add to ~/.profile & do a source ~/.profile. Shold know have goapp etc available.

Then a swift

cd 
open http://localhost:8080/
goapp serve .
[Cmd-R]

and we’re in business - edit the .go and it will get recompiler on the fly. REPL..

Comming next look here.

Using go

  • https://cloud.google.com/appengine/docs/go/
  • https://cloud.google.com/appengine/docs/go/gettingstarted/usingusers

Google App Engine

Google App Engine / Google Compute Engine

Google App Engine

Hosted App - go, python, etc

  • Find performance bottlenecks
  • Defer work
  • Betching
  • Caching
  • Concurrency
  • Control variance
  • golang.org/s/turkey-doodle
  • github.com/mjibson/appstats
    AppStats certainly looks interesting. A golang version of the Python package. Also worth looking at the source code as quite performant & possibly similar to what we may end up needing.
  • appenge / taskqueue – appengine / delay package

GetMulti instead of Get, PutMulti instead of Put.

Datastore.Get memcache.Get - cross instance (memcache is not persistant) Use RAM ! Not shared though.

Concurrent - go golang.

goapp serve . & goapp depoy .

cd ~/Documents/myapp
goapp serve
# Open http://localhost:8080 in Chrome

Also

cd ~/Downloads/go_wiki
go run simple_web_server.go

VM Management

Google docs

Resources

  • https://npf.io/2014/10/why-everyone-hates-go/
  • https://npf.io/2014/05/diffing-go-with-beyond-compare/

Videos

Go & React Native

The word golang here to help search engines..


The Go Programming language (golang)

Modules

Books

Installation

Follow macOS instructions here (or just use homebrew).

brew install go or brew upgrade go

cf

Links to amalgimate

go run main.go
go build system.go

Local doc. : godoc -http=:6060

go & Heroku

go install github.com/rikwatson/hello

The above command will put an executable command named hello (or hello.exe) inside the bin directory of your workspace. Execute the command to see the greeting:

$GOPATH/bin/hello
hello, world

[[JSON and Go]]

A Music Player in Go

Go App Engine

Download from here, unzip & then:

export PATH=/path/to/go_appengine:$PATH

Also add to ~/.profile & do a source ~/.profile. Shold know have goapp etc available.

Then a swift

cd 
open http://localhost:8080/
goapp serve .
[Cmd-R]

and we’re in business - edit the .go and it will get recompiler on the fly. REPL..

Comming next look here.

Using go

  • https://cloud.google.com/appengine/docs/go/
  • https://cloud.google.com/appengine/docs/go/gettingstarted/usingusers

Google App Engine

Google App Engine / Google Compute Engine

Google App Engine

Hosted App - go, python, etc

  • Find performance bottlenecks
  • Defer work
  • Betching
  • Caching
  • Concurrency
  • Control variance
  • golang.org/s/turkey-doodle
  • github.com/mjibson/appstats
    AppStats certainly looks interesting. A golang version of the Python package. Also worth looking at the source code as quite performant & possibly similar to what we may end up needing.
  • appenge / taskqueue – appengine / delay package

GetMulti instead of Get, PutMulti instead of Put.

Datastore.Get memcache.Get - cross instance (memcache is not persistant) Use RAM ! Not shared though.

…..

The word golang here to help search engines..