Busca en todas las páginas de la documentación
262 pages across 49 sections. 2712 questions total.
Google-scale build times and maintainability for server software written by large, rotating teams.
Go optimized for fast compilation, readable source, and safe-enough concurrency - not for winning academic feature checklists.
Simplicity in Go is a product decision across language, library, and tooling.
gofmt removes formatting debates, modules simplify dependency graphs, and the standard library covers HTTP, TLS, and JSON without framework shopping.
OS threads are relatively heavy.
Goroutines start small and are multiplexed by the runtime scheduler, so a service can run tens of thousands of concurrent I/O-bound tasks without thread stack overhead.
Think in terms of processes communicating over channels.
Assign ownership of data to one goroutine, pass copies or references through channels, and use sync primitives only when profiling shows a bottleneck.
Exceptions hide control flow and encourage deferred error handling far from the failure site.
Go forces local decisions: return, wrap, retry, or fail fast where the error occurs.
No.
Go adds features conservatively (generics, improved GC, go fix modernizers) while keeping existing programs building.
Breaking changes are avoided, not forbidden forever at the language design level.
Uniform formatting, small interfaces, explicit dependencies, and package boundaries that match team ownership.
Reviewers spend cognitive budget on behavior, not on decoding syntax varieties.
CPU-bound parallelism still needs GOMAXPROCS, worker pools, and profiling.
Embarrassingly parallel numeric work or shared mutable hot paths may fit Rust, C++, or GPU stacks better.
Not automatically.
Modern Go GCs (including Green Tea in 1.26) target low pause times, and tuning plus allocation discipline keeps many payment and RPC systems on Go.
Profile before assuming GC is the bottleneck.
Declare small consumer-side interfaces around the methods you call.
Tests supply fakes or the standard library's httptest types without inheritance trees.
It discourages gratuitous abstraction.
Layers that clarify boundaries (handler → service → repository) are common.
Layers that exist only to mimic enterprise patterns from other ecosystems are not.
Map the philosophy to domains your team actually ships, then compare candidates honestly before standardizing on Go for a new system.
Fast compilation, static binaries, built-in HTTP/gRPC, straightforward concurrency, and consistent observability patterns.
Teams onboard quickly and ship uniform services that container platforms run without language-specific runtimes.
Official client libraries, protobuf APIs, and community scaffolding (kubebuilder, controller-runtime) are Go-first.
The reconciliation loop model maps cleanly to explicit error returns and context cancellation.
Pick Go when you need easy cross-compilation, fast startup, and static distribution to many OS targets.
Python wins for ad hoc glue; Rust wins when CLI performance and memory safety are paramount and compile time is acceptable.
Yes for orchestration, ETL workers, and concurrent I/O-heavy pipelines.
Pure in-memory analytics at huge scale often stays on Spark/JVM or Python/pandas unless bottlenecks are operational, not numeric.
Small cold-start binaries and low baseline memory suit request-driven autoscaling.
Ensure graceful shutdown on SIGTERM and keep init work minimal in main.
Often for agents that are network-bound and team-maintained.
Replace C++ when manual memory safety cost exceeds GC overhead; keep C++ when you are inside the kernel or nanosecond scheduling path.
Mobile apps, browser-heavy SPAs, game engines, and desktop IDEs are adjacent to cloud systems but not Go's center of gravity.
It extends reach to microcontrollers and constrained WASM where the main GC runtime is too heavy.
Verify board targets and syscall support at build time - capabilities differ from desktop Go.
Keep orchestration, admission webhooks, and config reconciliation in Go.
Push SIMD-heavy transformation or zero-copy wire formats to languages that profile faster on CPU flame graphs.
Standardize when your roadmap is mostly networked services, K8s integrations, and CLIs.
Document exceptions in ADRs instead of forcing one language across research, frontend, and firmware.
You need concurrent network I/O, container deployment, long-term maintainability by a rotating team, and no hard requirement for a foreign ecosystem (JVM enterprise suites, Python ML stacks).
Compare specific language alternatives for your highest-risk component before committing a whole platform.
When nanosecond-level latency, deterministic memory, or existing C++ asset libraries dominate the cost model.
Most CRUD and RPC platforms do not sit there.
Migrate when container cost, startup time, or uniform platform velocity justify retraining.
Keep Java when Spring ecosystem integrations and team expertise outperform marginal infra savings.
Complement in most data platforms: Python trains and explores; Go serves and orchestrates.
Competitor only for simple scripts where Go's compile step feels heavy.
For I/O-bound services with a strong TS team, yes with discipline on CPU work and dependency hygiene.
Go still wins for many-platform standardization and simpler production binaries.
Critical.
A mediocre language your team masters beats a perfect language nobody can review on-call.
Use cgo sparingly for vetted native libraries.
Heavy C++ logic usually belongs in a sidecar or Rust/C++ service with a Go control plane.
Go wins for compiled CLIs shipped to customers.
Python (or shell) remains fine for short-lived automation inside CI agents.
Go typically leads Node and Python on CPU per request.
Framework choice and serialization design matter more than language religion.
When staying on JVM for ecosystem reasons while improving concurrent I/O.
Go already ships a similar value proposition without JVM footprint.
Pick Go for backend platform depth; pick Node when the same small team ships React + API together.
Many startups run Go APIs with a separate frontend.
TypeScript removes some safety gaps in Node but not runtime CPU/event-loop limits.
Shared TS types help BFFs; Go helps platform SRE uniformity.
Write an ADR citing dominant risk, rejected alternatives, and revisit triggers (QPS, compliance, headcount).
Producers should not depend on every consumer's abstraction.
Small consumer interfaces document exactly what the caller needs and keep mocks minimal.
No fixed cap - aim for one coherent responsibility.
If godoc reads like a catalog of unrelated utilities, split packages.
When most callers accept defaults and a minority tune timeouts, URLs, or credentials.
Required dependencies belong in New parameters, not options.
Use module major version suffixes (/v2) and keep v1 importing paths stable per the Go 1 compatibility promise for your own v1 line.
Return wrapped errors with documented sentinels for classification.
Export error types only when callers need structured fields beyond errors.As.
Thin: parse input, call a service method, translate errors to status codes.
If handlers exceed ~40 lines, move branching into testable services.
No.
Use generics when they remove real duplication; avoid them when a single function reads clearer.
Share protobuf/OpenAPI contracts, not giant shared Go config structs.
Keep service-specific tuning local; share only stable cross-service nouns.
Packages express boundaries; files organize readability inside a boundary.
Split packages when import cycles or unrelated concepts appear, not when files feel long alone.
Use godoc comments on exported symbols, CHANGELOG entries, and module tags.
Call experimental APIs Experimental in name or document instability in package comment.
Export fields when invariants are simple.
Use methods when validation, locking, or derived values are required - not JavaBean symmetry.
Simple APIs can hide pooling or batching inside the package.
Profile before adding complexity to exported surfaces - keep optimizations unexported.
The title reflects the core cultural decalogue; sections group related enforceable rules.
Adopt the whole list even though marketing rounds to ten themes.
Enforce gofmt, go vet, golangci-lint, -race, and govulncheck in CI.
Package boundaries and API shape stay human review with ADR backup.
Frameworks are fine when they remove boilerplate without hiding lifecycle.
Philosophy still demands explicit wiring, context, and shutdown in main.
Yes for concurrency, context, and errors.
Internal code can move faster on breaking changes - but prefer clear module boundaries anyway.
Importing Java/C# enterprise patterns - giant DI graphs, wide interfaces, and stringly errors - which Go's toolchain does not reward.
Use generics to remove duplication, not to build generic frameworks.
If func Map is clearer without type parameters, skip them.
When frameworks provide tested middleware ecosystems (auth, binding, OpenTelemetry hooks) that would take quarters to replicate.
Document the dependency in an ADR.
Onboard every engineer, revisit during major Go upgrades, and after incidents caused by concurrency or API drift.
Concurrency and context rules still apply where the runtime supports them.
Memory and syscall constraints may require slimmer dependencies - verify board targets at build.
Explicit reconcile loops, context-aware client calls, structured logging, and leader election shutdown mirror service rules.
Use controller-runtime patterns instead of inventing watch glue.
Lower incident rates from panics/races, faster onboarding surveys, fewer breaking API changes, and upgrade PRs dominated by tooling (go fix) not manual edits.
Move to fundamentals, concurrency, and architecture sections once team norms are aligned.