golang/go
Go
Go is an open-source programming language developed at Google and maintained by a large community of contributors. This repository (golang/go) contains the language specification, the reference compiler (gc), the runtime, the assembler and linker, the go command-line tool, and the entire standard library.
What this repository contains
The codebase is the canonical implementation of Go for most users. It bundles together everything needed to build, run, and ship Go programs:
- The compiler toolchain under
src/cmd/:compile(the gc compiler),link,asm,vet,cgo,gofmt, and the user-facinggotool. - The runtime under
src/runtime/: scheduler, garbage collector, memory allocator, goroutine and channel implementations, stack management, and platform-specific entry points. - The standard library under
src/: hundreds of packages includingnet/http,crypto/*,encoding/*,fmt,io,os,sync,time,reflect, and many more. - The language specification under
doc/: the formal Go specification (doc/go_spec.html), memory model (doc/go_mem.html), and assembler reference (doc/asm.html). - An end-to-end test suite under
test/: thousands of small programs that exercise compiler and runtime corners.
The canonical source repository lives at https://go.googlesource.com/go. The GitHub mirror at https://github.com/golang/go is a read-only mirror; contributions go through Gerrit code review at go-review.googlesource.com.
Who uses this codebase
Three audiences interact with this repo regularly:
- Go users who install a binary distribution from
https://go.dev/dl/and only ever read the standard library source for documentation purposes. - Distribution maintainers who build Go from source for platforms where Google does not ship a binary.
- Contributors who modify the compiler, runtime, standard library, or tools. Most of this wiki is aimed at them.
Quick links
- Architecture — how the compiler, runtime, and standard library fit together.
- Getting started — bootstrap, build, and run the toolchain locally.
- Glossary — Go-specific terms (G, M, P, gc, goroutine, write barrier, etc.).
- How to contribute — workflow, Gerrit, testing, and code review.
- Components — deep dives into the compiler, runtime, linker,
gocommand, and standard library. - By the numbers — codebase statistics snapshot.
- Lore — timeline of how the codebase evolved since 2008.
License
Go source files are distributed under the BSD-style license in LICENSE. There is also a separate PATENTS grant. See LICENSE and PATENTS at the repo root for the exact terms.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.