Articles tagged "golang"
Page 1 of 3
Fix Go Error: "cannot find package" / "cannot find module providing package" (2026)
Fix Go's "cannot find package" and "cannot find module providing package" errors. Covers the GOPATH-era vs module-era message, import path typos, go get, replace directives, vendoring, and internal package rules.
Fix Go Panic: "index out of range" Runtime Error (2026)
Fix Go's "panic: runtime error: index out of range" crash. Learn how to read the panic message, the len vs cap distinction, and defensive patterns that keep slice and array access safe.
Fix Go Error: "missing go.sum entry for module providing package" (2026)
Fix Go's "missing go.sum entry for module providing package" error. Learn why go.mod and go.sum diverge, how go mod tidy fixes it, the GOFLAGS=-mod=mod caveat, and vendor mode gotchas.
Go Goroutines and Channels: Production Concurrency Patterns (2026)
Master Go goroutines and channels with production patterns: worker pools, fan-out/fan-in, context cancellation, semaphores, and pipeline patterns — with benchmarks and real-world examples.
Go Concurrency: Goroutines, Channels and sync.WaitGroup with Real Examples (2026)
Master Go concurrency: goroutines, channels, sync.WaitGroup, Mutex, select, and worker pools with real-world examples. Avoid common mistakes.
Go REST API with Gin: From Zero to Production (2026)
Build a production-ready REST API in Go using the Gin framework. Includes routing, middleware, JSON responses, PostgreSQL integration, and Docker deployment.
SOLVED: function main is undeclared in the main package (Go)
Fix Go error "function main is undeclared in the main package". Causes: wrong package name, missing main(), running go run on wrong file, or build tags.
Fix 'cannot use X (type Y) as type Z' in Go — Type Mismatch Guide
Fix 'cannot use X (type Y) as type Z' in Go. Covers explicit conversions, interface satisfaction, pointer vs value receivers, and type assertions with the ok pattern.
Go: Convert Rune to String and String to Rune — Complete Guide (2026)
Convert rune to string in Go with string(r). Convert string to rune slice with []rune(s). Covers Unicode, utf8 package, for range iteration, and rune vs byte.
Go: Convert String to Int (and Int to String) — Complete Guide (2026)
Convert string to int in Go using strconv.Atoi, strconv.ParseInt, fmt.Sscanf. Convert int to string with strconv.Itoa, FormatInt, Sprintf. All methods compared.