The intent of this guide is to give you an idea about the Go ecosystem and help guide your learning if you are confused. It is mainly focused on presenting the tools and concepts used in web development. Feel free to send comments
- suggestions or even a PR improving at some point.
I will be super happy to know that you would like to collaborate or that we helped in some way in your formation when it comes to Go.
This browser does not support PDFs. Please download the PDF to view it: Download PDF.
-
Basic & Intermediate Concepts
Variables, Types, and Operators
- generics
- constantsif/else, switch
- switch
- if / elseLoops (for, range)
- for
- rangeFunctions and Methods
- functions
- variadic functions
- return
- closures/anonymous functions
- methods
- deferData Structures (array, slice, map, struct)
- array
- slice
- make
- new
- maps
- structsPointers
- pointersTypes
- types
- type interface
- interface{}
- Goroutine
- channel
- channel buffer
- select
- sync.Mutex
- sync.Map
- sync.WaitGroup
- sync.Pool
- Runtime
- runtime.GOMAXPROCS
- runtime.NumCPU()
- runtime.NumGoroutine()
-
Go Test
- go test
- go test -bench . -benchmem
- go test -coverprofile
- go test -fuzz=Fuzz
- [go test -run ^NameFunc$]
- [go test -v]Go Build & Go Run
- [CGO_ENABLED=0 go build]
- [go build -buildmode=plugin]
- [go build -gcflags -S]
- [go build -gcflags '-m -l']
- [go build -ldflags="-s -w"]
- [GOOS=linux GOARCH=amd64 go build]
- [go build GOARCH=wasm GOOS=js go build]
- [go help buildmode]
- go run .
- [go run -race .]Installation
- go install golang.org/x/website/tour@latest
-
Package & Import
- import
- import "fmt"
- import "my-pkg/util"
- package mypkgGo Module Features
- go.mod
- go.sum
- go mod init
- [go mod tidy]
- [go mod vendor]
- [go mod download]
- go env
- GO111MODULE=on
- GOARCH=amd64
- GOPRIVATE
- GOPROXY
- GOSUMDB
- Padrões
- Builder
- Factory Method
- Abstract Factory
- Adapter
- Bridge
- Facade
- Composite
- Decorator
- Prototype
- Singleton
- Template Method
-
Frameworks - Fiber
- GrameworkMiddleware
- Iu
- fiber-middlewareRoteamento
- fasthttp-routing
- atreugoWebsocket
- fast-http-socket
- fastws
-
Server
- http.NewServeMux
- http.Server
- http.HandlerFunc
- http.Handle
- http.Handler
- http.Status
- next.ServeHTTP
- ListenAndServe
- ListenAndServeTLS
- http.FileServer
- http.Dir
- http.StripPrefix
- Embed
- http.FS
- html/template
- template.ParseFiles
- template.Parse
- template.ParseFS
- template.New
- template.Must
- template.Execute
- template.ExecuteTemplateClient
- http.Transport
- http.Client
- http.Get
- http.Post
- http.PostForm
- ioutil.ReadAll(r io.Reader)
- http.NewRequest
- http.NewRequestContext
- Context.WithCancelWeb Frameworks
- gin
- echo
- beego
- iris
- martini
- gocraft
- revel
- buffalo
- chi
- macaron
- webgo
- quickRouters
- alien
- bellt
- bone
- bxog
- goroute
- httprouter
- httptreemux
- gorilla/mux
- ozzo-routing
- pure
- siesta
- vestigo
- xmux
- xujiajun/gorouterMiddlewares
- negroni
- muxchain
- go-wrap
- interpose
- ryeMiddeware Libs
- CORS
- rate limit
- logging
- metrics
- auth
- tracing
- limiter
- jwt
- logger
- cache
- Instrumentation
- Prometheus
- Datadog
- New Relic
- loggly
-
Git
- git
- git init
- git add .
- git commit
- git push
- git merge
- git rebase
- git log
- git diff
- git show
- git cloneDocker
- docker run
- docker build
- docker images
- docker push
- docker login
- docker ps -aRelational
- PostgreSQL
- MySql
- SqlServer
- Oracle
- MariaDBNoSql
- MongoDB
- Cassandra
- RavenDB
- RethinkDB
- CouchDB
- CockroachDB
- Redis
- Elasticsearch
- ArangoDBQueue
- RabbitMQ
- KubeMQ
- SQS Aws
- Pub/Sub Google Cloud
- Beanstalk
- ActiveMQStream
- Kafka
- Redpanda
- KubeMQ
- Nats
- Kinesis AwsProtocols
- Applications
- gRPC
- rpc
- xml-rpc
- WebSocket
- Serialization
- Protobuf Buffer
- gob
- msgpack
- bson
- Avro
- Thrift
- json
- xml
- tcp
- udp
- http
- http2
- http3
- MQTT