# Go 1 27

> Apply Go 1.27 language features, tooling, standard-library APIs, migrations, and behaviour changes. Load for Go work targeting 1.27 or later when the model's knowledge may predate the 2026-08-19 release.

- Skill: `cedws/go-1-27` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cedws/go-1-27`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cedws/go-1-27/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: cedws (https://skillmd.com/u/cedws)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cedws/go-1-27

---


# Go 1.27

This overview applies when the project's target Go version is at least 1.27.

## Language

- Methods may declare their own type parameters. Interface methods cannot
  declare type parameters, and generic methods cannot implement interface
  methods.
- Keys in struct literals may be field selectors, including selectors that name
  fields within embedded structs.
- Generic function type inference applies whenever a function is assigned or
  converted to a matching function type.

## Tools and modules

- The `compile`, `link`, `asm`, `cgo`, `cover`, and `pack` tools accept
  GCC-style response files through `@file` arguments.
- The `go` command no longer fetches modules from Bazaar (`bzr`) servers.
- Removed `GODEBUG` settings remain accepted in `go.mod` and `//go:debug` only
  when set to their final default. Earlier values cause the build to fail.
- `go test` runs the `stdversion` vet check by default. It identifies standard
  library symbols newer than the version selected by the module and file tags.
- `go test -json` output events may include `OutputType` values such as `error`,
  `error-continue`, and `frame`.
- `go doc` accepts `package@version`; `-ex` lists executable examples and a
  named example includes its source and comments.
- `go fix` adds the `atomictypes`, `embedlit`, `slicesbackward`, and
  `unsafefuncs` modernisers. The `fmtappendf` analyser is removed, and
  `waitgroup` is renamed to `waitgroupgo`.
- `go mod tidy` for modules at Go 1.27 or later consolidates requirements into
  at most one direct and one indirect block while preserving associated
  comments.
- A port-only `go tool trace -http=:6060` address binds to localhost. An
  explicit address such as `0.0.0.0:6060` exposes it on all interfaces.

## Runtime and diagnostics

- Tracebacks include `runtime/pprof` goroutine labels for Go 1.27 modules.
  `GODEBUG=tracebacklabels=0` disables them when labels contain sensitive data.
- Time package channels are always synchronous. The `asynctimerchan`
  compatibility setting is permanently removed.
- The `goroutineleak` profile and `/debug/pprof/goroutineleak` endpoint are
  generally available. Detection is reachability-based and cannot identify every
  permanently blocked goroutine; `GOEXPERIMENT=goroutineleakprofile` is removed.
- Size-specialised allocation is enabled for small allocations and adds roughly
  60 KB to binaries. `GOEXPERIMENT=nosizespecializedmalloc` is a temporary
  opt-out expected to disappear in Go 1.28.

## Standard library

- `encoding/json/v2` supplies option-based marshal and unmarshal APIs, including
  reader, writer, encoder, and decoder forms. Its defaults reject invalid UTF-8
  and duplicate object names.
- `encoding/json/jsontext` provides token- and value-level JSON processing with
  stateful validation. Numeric token accessors return errors.
- `encoding/json` is backed by the v2 implementation while retaining v1
  behaviour and support; error text may differ. Compatibility options expose
  v1 semantics, and `GOEXPERIMENT=nojsonv2` temporarily restores the old
  implementation.
- `crypto/mldsa` implements FIPS 204 ML-DSA. `crypto/x509` supports ML-DSA keys
  and signatures, and TLS 1.3 supports the ML-DSA signature schemes.
- `uuid` generates and parses UUIDs.
- `bytes.CutLast` and `strings.CutLast` split around the last separator
  occurrence, covering common `LastIndex` patterns.
- `compress/flate` may produce different valid bytes, affecting ZIP, gzip, zlib,
  and PNG output derived from it.
- `crypto/tls.Config.Rand` is deprecated; `testing/cryptotest.SetGlobalRandom`
  provides deterministic randomness for tests. `MLKEM1024` is available through
  `CurvePreferences`, and `ConnectionState.LocalCertificate` reports the chain
  presented to the peer.
- `crypto/x509.SystemCertPool` honours `SSL_CERT_FILE` and `SSL_CERT_DIR` on
  Windows and Darwin, selecting the Go verifier when either is set.
- `database/sql.ConvertAssign` exposes `Rows.Scan` conversions to drivers, while
  `driver.RowsColumnScanner` permits direct scanning into caller destinations.
- `go/types.Hasher` and `HasherIgnoreTags` hash types according to the
  corresponding identity relations. The removed `gotypesalias` setting means
  alias declarations always produce `Alias` nodes.
- `hash/maphash.Hasher` defines hashing and equality for a type;
  `ComparableHasher` implements that contract for comparable values.
- `math/big.Int.Divide` computes quotient and remainder with truncation, floor,
  round, or ceiling modes. `math/rand/v2.Rand.N` is the method form of `N`.
- Unix connection reads return `io.EOF` directly rather than a wrapping
  `net.OpError` when the underlying read reaches EOF.
- HTTP/2 servers honour RFC 9218 client priority signals unless
  `Server.DisableClientPriority` is set. Closing an HTTP/1 response body drains
  a bounded amount of unread content to improve connection reuse.
- `http.Server.MaxHeaderValueCount` limits accepted header values.
  `httptest.NewTestServer` uses an in-memory network compatible with
  `testing/synctest`.
- `url.URL.Clone` and `url.Values.Clone` make deep copies.
  `testing/synctest.Sleep` combines `time.Sleep` with `synctest.Wait`.
- Unicode support advances from Unicode 15 to Unicode 17.

## Experimental features

- `GOEXPERIMENT=simd` enables the experimental portable, vector-size-agnostic
  `simd` package. Its operations use hardware instructions where available.
- The same experiment enables the unstable, non-portable `simd/archsimd`
  package. It supports amd64, arm64 Neon, and WebAssembly vector operations with
  APIs tied to each architecture.

## Compatibility and platforms

- Relative filenames in `//line` and `/*line*/` directives resolve from the
  containing source file's directory.
- Closure symbol names are simpler and may be shared across inlined instances.
  Tests that inspect those symbols can observe different names, and function
  code pointers remain unsuitable for comparing closures.
- The `tlsunsafeekm`, `tlsrsakex`, `tls3des`, `tls10server`, and
  `x509keypairleaf` `GODEBUG` compatibility settings are permanently removed.
- macOS builds require macOS 13 Ventura or later.
- Linux `ppc64` uses the ELFv2 ABI. Cgo, position-independent executables, and
  external linking require an ELFv2-compatible runtime and Linux kernel support.

