aizatto.com
Deep Thought
GitHub
Linkedin
aizatto.com
Career Guide
Engineering Code
Why GitBook?
Projects / Tools / Toys
Notes
AWS
Go Lang
GraphQL
JavaScript
New Mac
Node.js
React
Repository Management
Serverless
Software Architectures
Stripe
Powered by GitBook
Have an account? Sign in

Go Lang

Last updated 22 days ago
  • ​https://golang.org/​

  • ​https://golang.org/doc/code.html​

  • ​https://golang.org/doc/effective_go.html​

  • ​https://github.com/golang/go/wiki/Learn​

  • ​https://github.com/golang/go/wiki/CodeReviewComments​

  • Git pre-commit hook​

Set up

brew install go
mkdir -p ~/src/go
ln -s ~/src/go ~/go

Inside .bash_profile

[[ -d $HOME/src/go/ ]] && export GOPATH=$HOME/src/go/

Others

export GOPATH=$(go env GOPATH)
export PATH=$PATH:$(go env GOPATH)/bin

Pros

  • gofmt

Cons

  • Uses tabs for identation

Editorconfig

​https://github.com/editorconfig/editorconfig-core-go/blob/master/.editorconfig​

GraphQL

​https://github.com/neelance/graphql-go https://github.com/graphql-go/graphql https://github.com/graphql-go/relay​

length

len("/view/")

Best Practices

​https://talks.golang.org/2013/bestpractices.slide#1 https://peter.bourgon.org/go-best-practices-2016/#development-environment https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1 https://devhints.io/go​

Examples

Wiki

​https://golang.org/doc/articles/wiki/ https://golang.org/doc/articles/wiki/final.go​

Previous
DynamoDB
Next - Notes
GraphQL
Contents
Set upInside .bash_profileOthersProsConsEditorconfigGraphQLlengthBest PracticesExamplesWiki