apitxt

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command apitxt writes and checks the API golden files of the module: one sorted text file per public package under api/go, one fact per line, plus the tier checks of docs/specs/api-stability.md §4.3.

go run ./internal/cmd/apitxt -w        rewrite api/go/*.txt
go run ./internal/cmd/apitxt -check    fail when api/go is out of date or a check fails
go run ./internal/cmd/apitxt -classify < apidiff.out
                                       tag apidiff lines as stable/experimental (scripts/apidiff.sh)

The API is loaded from compiler export data (go list -export) for each of linux, darwin and windows with CGO_ENABLED=0 and merged; lines that only exist on some platforms carry a " [darwin]"-style suffix. Only the standard library is used, like site/tools/apigen.

Files are named after the package path relative to the module with "/" replaced by "_" (ui/theme -> api/go/ui_theme.txt); the root package uses its package name (api/go/tango.txt). Tiers come from api/tiers.txt and the stable-symbol allowlists of "split" packages from api/stable/<same name>.txt. See docs/release.md ("API 稳定性").

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL