This is a set of example programs in Go (golang) to learn Go. The Go language is often referred to as golang to help searches.
- Install GO (https://golang.org/doc/install)
- Setup GOPATH (https://github.com/golang/go/wiki/SettingGOPATH)
- move to GOPATH : cd $GOPATH
- Build : go build go-playbook
- Run : ./go-playbook
- package : main.go , package.go
- import : main.go
- exported-name : main.go
- function, named return values : package go-playbook/function
- function values : function-values.go
- variables , short variable declarations: main.go
- constants : package go-playbook/function
- for : control/control.go
- switch : switch.go
- defer : defer.go
- pointer : pointer.go
- struct : struct.go
- struct literals : struct-literals.go
- array : array.go
- array slice : array_slice.go , making-slice.go , slice_literals.go, slice-len-cap.go
- interface : interface.go , interface-values.go , interfaces-are-satisfied-implicitly.go
- empty interface : empty-interface.go
- method : method.go
- range : range.go
- stringers : stringers.go
- error : error.go
- type switch : type-assertions.go
- concurrency : package concurrency
- oops : object-oriented-implementations.go
- http : http.go
- web : web-app-base.go
- time and date : time-date.go
- json : json.go
- The Go Programming Language Specification
- The Go Memory Model
- Go Concurrency Patterns
- Go Wiki
- Go Package
- Search for Go Packages
- Projects
- Dep management
- The Vendor Tool for Go
- This package is a sample with GORM and sqlite
- install GORM and go-sqlite3 (go get -u github.com/jinzhu/gorm , go get github.com/mattn/go-sqlite3)
- Refer the orm/init.go for the implementation
corrections and any contributions are encouraged, please submit a pull request with your change or an issue for a bug or fix.
This set of examples assumes a certain level of programming experience and is intended for someone learning the Go language and not someone new to programming altogether.
The official site has a Tour of Go which is an interactive walk through, another good introduction to the language.
- https://gobyexample.com/
- https://golang.org/doc/
- https://github.com/mkaz/working-with-go/tree/master/euler
- https://github.com/GoesToEleven/GolangTraining
- https://github.com/ribice/gorsk
- A curated list of awesome Go frameworks, libraries and software
- Web Frameworks
- https://github.com/micro/go-micro
- https://gobuffalo.io/en
- Micro Service
- Go ORM
- Go dependency management tool
- Gophers Slack Channel
- Why should you learn Go
- Memory Optimization In Golang
- https://blog.gojekengineering.com/the-many-flavours-of-dependency-injection-in-go-25aa070d79a0
- Golang Guide: A List of Top Golang Frameworks, IDEs & Tools
- Exceptional Go
- https://blog.discordapp.com/how-discord-resizes-150-million-images-every-day-with-go-and-c-c9e98731c65d
- https://hackernoon.com/microservices-are-hard-an-invaluable-guide-to-microservices-2d06bd7bcf5d
- https://itnext.io/strings-in-go-golang-b8c78bae8132
- https://medium.com/@raul_11817/securing-golang-api-using-json-web-token-jwt-2dc363792a48