distpack

command standard library
go1.26.11 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 19 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

Distpack creates the tgz and zip files for a Go distribution. It writes into GOROOT/pkg/distpack:

  • a binary distribution (tgz or zip) for the current GOOS and GOARCH
  • a source distribution that is independent of GOOS/GOARCH
  • the module mod, info, and zip files for a distribution in module form (as used by GOTOOLCHAIN support in the go command).

Distpack is typically invoked by the -distpack flag to make.bash. A cross-compiled distribution for goos/goarch can be built using:

GOOS=goos GOARCH=goarch ./make.bash -distpack

To test that the module downloads are usable with the go command:

./make.bash -distpack
mkdir -p /tmp/goproxy/golang.org/toolchain/
ln -sf $(pwd)/../pkg/distpack /tmp/goproxy/golang.org/toolchain/@v
GOPROXY=file:///tmp/goproxy GOTOOLCHAIN=$(sed 1q ../VERSION) gotip version

gotip can be replaced with an older released Go version once there is one. It just can't be the one make.bash built, because it knows it is already that version and will skip the download.

Jump to

Keyboard shortcuts

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