Go Errgroup Sync Parallel Goroutines Error Limit Context Cancel
Panduan Go errgroup: jalankan N goroutine paralel, satu error cancel ctx, wait return err, dan jebakan loop var capture + tulis slice tanpa index/mutex.
Bahasa pemrograman backend yang cepat dan ringkas. Pelajari Structs, Interfaces, concurrency (Goroutine/Channel), dan HTTP server.
Panduan Go errgroup: jalankan N goroutine paralel, satu error cancel ctx, wait return err, dan jebakan loop var capture + tulis slice tanpa index/mutex.
Panduan Go untuk struct, interface, pointer, dan method, termasuk pointer vs value receiver, method set, zero value, dan decoupling via interface.
Go Error Handling Packages Testing Project Structure
Panduan Go error handling: return error value, if err != nil, wrap %w, sentinel errors.Is, dan jebakan lupa cek err + %v bukan %w + panic untuk error bisnis.
Panduan Go interface: implementasi implisit, any/interface{}, type assertion, dan jebakan assertion tanpa ok + nil interface vs nil pointer + interface terlalu besar.
Panduan Go memulai: instalasi, hello world, go mod init, struktur workspace modules vs GOPATH, dan jebakan lupa init + package bukan main + tidak go fmt.
Panduan Go package: deklarasi folder=package, init() otomatis, internal/ terisolasi, dan jebakan circular import + impor internal dari luar + side-effect import.
Panduan Go workspace go.work: multi-module dev lokal tanpa proxy, replace path, dan jebakan commit go.work ke release + lupa replace saat tanpa workspace.
Panduan Go config Viper: baca file/env/flag, prioritas override, WatchConfig fsnotify untuk reload, dan jebakan Get sebelum ReadInConfig + watch tanpa guard race.
Panduan struktur program Go: package, import, func main, := short declaration, dan jebakan import tak terpakai + variabel tak dipakai + huruf kecil saat export.
Panduan testing Go dengan testify: assert vs require, suite SetupTest/TearDown, mock, dan jebakan require di loop tanpa subtest + state suite bocor.
Panduan Go Web API lanjut: error response seragam, validasi struct, versioning path, status code tepat, dan jebakan bocorkan stack di error.
Panduan gRPC Go: definisi proto, generate stub, unary server/client, TLS, dan jebakan ubah field number + tanpa TLS produksi.
Panduan praktis concurrency di Go untuk goroutine, channel, select, worker pattern, context cancellation, dan jebakan deadlock, goroutine leak, serta race condition.
Panduan praktis net/http di Go untuk HTTP server, routing dasar, middleware pattern, parsing JSON request/response, dan jebakan umum saat membangun API kecil.
Panduan praktis Go untuk encoding/json, struct tags, omitempty, RawMessage, validasi payload, dan handling time format serta timezone.
Panduan referensi Go untuk package, module, workspace, `go.mod`, `go.sum`, versioning dependency, dan jebakan import path.
Panduan referensi Go untuk testing, table-driven tests, testing.T, subtests, httptest, mocks/fakes sederhana, benchmark dasar, dan jebakan test rapuh.
Panduan praktis context di Go untuk cancellation, deadlines, timeouts, propagasi context di HTTP/server/worker flow, dan jebakan umum seperti menyimpan context di struct atau lupa cancel.
Panduan error handling Go untuk sentinel error, custom error, wrapping dengan %w, errors.Is/As, panic/recover, dan jebakan umum seperti error shadowing dan kehilangan konteks.
Panduan praktis CLI di Go dengan flag package, subcommand pattern, positional args, alur parse→validate→run, dan jebakan umum saat parsing input baris perintah.
Panduan Go generics untuk type parameters, constraint any/comparable/custom interface, generic function/type, dan jebakan saat over-abstracting.
Panduan Go embed.FS dan io/fs untuk menyematkan aset ke binary, abstraction fs.FS, serta testing dengan fstest.MapFS tanpa menyentuh disk.
Panduan Go sync package untuk WaitGroup, Mutex/RWMutex, Once, atomic, dan jebakan race, copy mutex, serta hold lock terlalu lama.
Panduan Go net/http middleware chain: pola func(next Handler) Handler, urutan chain mundur, context antar middleware, dan jebakan next dipanggil dua kali atau lupa.
Panduan Go database/sql: sql.Open + Ping, Query/QueryRow + Scan, Prepare, transaksi, pool setting, dan jebakan rows.Close serta lupa rows.Err.
Panduan testing Go: table tests + t.Run subtest, fuzz dengan corpus, testing/iotest (OneByteReader, TimeoutReader), dan jebakan loop variable capture serta t.Fatal vs Error.
Panduan Go modules: semantic import versioning /vN major, replace lokal/fork, go mod tidy, dan jebakan lupa /vN + commit replace lokal + major tanpa tag.
Panduan observability Go: net/http/pprof CPU/mem, expvar metrik, runtime/trace, dan jebakan pprof terbuka publik + lupa stop trace.