Skip to content

nakamasato/golang-training

Repository files navigation

Golang Training

codecov

Version

go1.23

Basics

  1. Install Go: https://go.dev/doc/install
    1. If you want to manage multiple versions, use gvm.
  2. Run Go test:
    • go test -cover
    • go test -v
    • go test -race race detector
  3. Init a module.
    go mod init <modulepath e.g. "tmp">
    multiple mod: go.work
    go work init
    go work use .
    
    add go.work* to .gitignore
  4. Tools:

GitHub Actions

Details
      - uses: actions/checkout@v3

      - name: set up
        uses: actions/setup-go@v4
        with:
          go-version-file: go.mod

Contents

  1. Learn Go with tests (Official: https://quii.gitbook.io/)
    1. Go fundamentails
    2. Build an application
    3. Questions and answers
    4. Meta
  2. Pattern
    1. Golang Functional Options Pattern
  3. Pragmatic Cases
    1. Database
      1. ent (go1.17 is removed when upgrading to ent@v0.11.3 #85)
      2. MySQL
      3. Migrate
        1. Postgres
        2. MySQL
      4. atlas
    2. Kubernetes
      1. kind cluster
      2. k8s client (needs go1.17 or later to use controller-runtime@v0.13.0 #83)
      3. Skaffold
    3. Others
      1. Prometheus
      2. Cobra
      3. Ginkgo
      4. String to Object
      5. Opentelemetry
      6. gojsondiff
      7. hcl
  4. Integrated Examples
    1. CloudRun
    2. Dataflow
    3. Tracing with OpenTelemetry on GCP
    4. gdrive

References & readings

  1. Learn Go with Tests
  2. Advanced Testing with Go
  3. よくわかるcontextの使い方
  4. Goでの並行処理を徹底解剖!

About

History of studying Golang from zero

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages