How do you process and analyze text in Go?
Process and analyse text in Go with strings, regexp, bufio and unicode, handle UTF-8 correctly, and build a streaming word-frequency counter.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Process and analyse text in Go with strings, regexp, bufio and unicode, handle UTF-8 correctly, and build a streaming word-frequency counter.
Go generates HTML, CSV, Excel and PDF documents with the standard library and a few packages. Learn the patterns for safe generation, storage and serving.
A practical guide to Go security testing: httptest checks, native fuzzing, race detection, govulncheck and gosec wired into CI.
Go returns errors as values instead of throwing exceptions. This guide covers wrapping, errors.Is and errors.As, panic and recover, and practical rules.
Go modules handle dependencies through go.mod, go.sum and the go command. Learn the commands, versioning rules and strategies for safe, reproducible builds.
Go code quality relies on the standard toolchain plus linters and CI. Here is what to automate, what to test and what human reviewers should check.
Use the testing package and go test for unit tests, table-driven subtests, benchmarks, fuzzing and coverage, then automate them in CI.
A practical CI/CD setup for Go: lint, test with the race detector, scan for vulnerabilities, build reproducible binaries and ship minimal containers.
The Go standard library has no orchestration framework, but os/exec, net/http and syscall let you control containers and build reconcile loops.
Go supports data privacy through TLS, AES-GCM, password hashing and careful logging. See working examples and the habits that keep personal data safe.
Learn how to write, build and deploy Go functions on AWS Lambda and Cloud Run, with working handler code and cold start advice.
Go uses Git for history and modules for dependencies. See go.mod, semantic version tags, the module proxy, vendoring and repository best practices.
Go has no built-in broker client, but channels, net/http and context cover the basics. Learn queue patterns, client libraries and safe delivery in Go.
Go compiles to a single static binary and its standard library covers files, processes, HTTP and concurrency. Learn how to build reliable automation tools.
Learn batch processing and pipelines in Go using goroutines, channels, context and slices.Chunk, with tested patterns for errors and cancellation.
Go's runtime schedules goroutines for you; you schedule the work. See tickers, timers, worker pools and cron libraries with best practices.
Go has no built-in migration tool. See how to version SQL files, build a minimal runner with embed, and choose golang-migrate, goose or Atlas.
Use log/slog for structured, leveled logging in Go and ship JSON logs from stdout to a log backend. Includes code, redaction and analysis tips.
Use slog, expvar, runtime/metrics and pprof from the Go standard library for logs, metrics and profiling, then add OpenTelemetry for distributed tracing.
How Go serializes and deserializes data with encoding/json, struct tags and custom marshalers, plus strict decoding, streaming and format choices.