and performant • GO routines and concurrency model • Great Tooling (testing, benchmarking, profiling) • Cross compilation and easy to deploy (single binary) • Awesome community (gophers.slack.com)
A Tour of GO (https://tour.golang.org) • Books (The GO programming Language) • Videos and Courses: JustForFunc, GopherCon, Ardan Labs, Todd Macleod • Looking at Open Source Projects (Upsin, Apex, InfluxDB, HashiCorp, etc...)
• Organize packages by components (models, controllers, repositories) • Clean Architecture (Entities, Use Cases, Adapters) • Hexagonal Architecture (Domain, Application, Infrastructure) • How do you structure your GO apps - Kat Zien talk at GopherCon 2018
causes unexpected behaviour • Good errors must give helpful information for programmers • Errors should be divided: ◦ Application Error e.g. Error establishing a database connection ◦ User Error e.g. An internal error has occurred. Please contact support
◦ go get -u github.com/derekparker/delve/cmd/dlv • Run dlv command ◦ dlv debug github.com/talento90/imgart/cmd/imgartapi ◦ dlv test github.com/talento90/imgart/image • Open Source: https://github.com/derekparker/delve
of Go packages ◦ go test -v -race ./... • Package that provides support for HTTP testing: net/http/httptest • Find code using the following pattern: ◦ func TestXxx(*testing.T) • Supports Benchmarking tests ◦ func BenchmarkXxx(*testing.B)
application by domain • Errors must be programmer friendly • ctx.Context Package ◦ WithValue must store request scoped values (e.g: CorrelationId) ◦ Provides cancellation