How do you use Go's standard library for security and encryption?
Use Go's crypto packages correctly: SHA-256 hashing, HMAC, AES-GCM authenticated encryption, secure random tokens, password hashing and TLS.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Use Go's crypto packages correctly: SHA-256 hashing, HMAC, AES-GCM authenticated encryption, secure random tokens, password hashing and TLS.
Go's static binaries, fast startup and concurrency suit the cloud. See SDK examples, a graceful HTTP service, container builds and deployment options.
Use net/http, slog, context and os/signal to build a cloud-ready Go service with health checks, timeouts and graceful shutdown.
Build web servers and JSON APIs with Go's standard library. Covers ServeMux routing, middleware, timeouts, graceful shutdown and httptest.
Build a complete Go HTTP service with net/http: method and wildcard routing, JSON handling, middleware, templates, timeouts, testing and graceful shutdown.
Go handles data with database/sql, file APIs and encoders. See current examples for queries, transactions, file I/O and concurrency-safe in-memory data.
Learn database/sql in Go: connection pooling, parameterised queries, scanning rows, transactions and other standard-library storage options.
Go's net package offers TCP, UDP and Unix sockets with goroutines per connection. Learn deadlines, framing, graceful shutdown and common pitfalls.
Learn how Go's net, net/http and crypto/tls packages build TCP servers, HTTP APIs and clients, with deadlines, contexts and graceful shutdown.
Compare cgo, c-shared libraries, gRPC, subprocesses and WebAssembly for connecting Go with C, Python and other languages, with working examples.
Go has no built-in cross-process locks. See how to use sockets, pipes, gRPC, file locks and etcd or Redis locks for distributed and parallel Go systems.
Go runs goroutines in parallel on OS threads via its scheduler and uses os/exec for separate processes. See worker pools, locking and profiling techniques.
Use pprof, go test -bench and go tool trace to find CPU, memory and scheduling bottlenecks in Go programs, with runnable examples for each tool.
Go runs goroutines in parallel across CPU cores. Learn worker pools, chunking, atomics and profiling to speed up concurrent programs.
Learn Go concurrency patterns from the standard library: WaitGroup, channels, worker pools, context cancellation and safe shared state.
Goroutines cannot return errors directly. See how to use channels, errgroup, errors.Join and context to collect errors and cancel work safely.
Learn how the Go context package cancels goroutines, enforces timeouts and propagates deadlines, with runnable examples for HTTP handlers and workers.
Go reports some deadlocks at runtime and finds races with the -race flag. Learn the causes, fixes with mutexes, atomics and channels, and how to debug.
sync.Mutex prevents data races on shared state and sync.WaitGroup waits for goroutines to finish. See working examples, RWMutex, wg.Go and common mistakes.
Go synchronizes goroutines with channels, mutexes, WaitGroup and atomics. See when to use each, with runnable examples and race detector tips.