https://dave.cheney.net/resources-for-new-go-programmers
I think this is a pretty good enough curation of all the resources one will ever need to "Get Started" with Go.
- I have started with https://tour.golang.org
- I am making a client to consume the DigitalOcean API to understand the concepts better. Looking at the source of godo as inspiration.
- Done with go-koans
- Experimenting with GitHub v4 GraphQL API
- Gophercises quiz
- Random snippets added
If using database/sql
, you can log sql statements using
import (
"github.com/luna-duclos/instrumentedsql"
"modernc.org/sqlite"
)
logger := instrumentedsql.LoggerFunc(func(ctx context.Context, msg string, keyvals ...interface{}) {
log.Printf("%s %v", msg, keyvals)
})
sql.Register("instrumented-sqlite", instrumentedsql.WrapDriver(&sqlite3.SQLiteDriver{}, instrumentedsql.WithLogger(logger)))
db, err := sql.Open("instrumented-sqlite", dataSourceName)