Help us shape the future of Go! Take the 2026 Go Developer Survey

packaging

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package packaging describes what a release package contains.

It exists so that the answer lives in one place instead of three. The same list has to be true of .goreleaser.yml, of the zip an operator downloads and of the README that tells them what is in it, and the tests beside this file check all three against what is written here. Nothing in the server imports it: the binary does not read its own packaging.

The names are the contract an operator sees, so changing one is a change to the product, not a refactor. Someone has a script that fetches pacenote-ce_1.2.0_linux_amd64.zip.

Index

Constants

View Source
const Binary = "pacenote-server"

Binary is the program inside the archive, without the .exe that Windows wants. See BinaryName.

View Source
const Checksums = "checksums.txt"

Checksums is the single file covering every archive in a release.

View Source
const Project = "pacenote-ce"

Project is the name every archive starts with. It is not the binary's name — "pacenote-ce" says which edition the download is, and pacenote-server says which program is inside it.

Variables

This section is empty.

Functions

func ArchiveName

func ArchiveName(version string, p Platform) string

ArchiveName is the file an operator downloads:

pacenote-ce_0.1.0_linux_amd64.zip

The version carries no leading v, because that is what GoReleaser's .Version interpolates and a name that disagrees with the tool that writes it is a name that will drift.

func BinaryName

func BinaryName(goos string) string

BinaryName is the binary's file name on one platform.

func Contents

func Contents(p Platform) []string

Contents is every entry inside one platform's archive, sorted, which is what a test compares a real zip against.

func Docs

func Docs() map[string]string

Docs is every file an operator reads, in the order they need them: what this is and how to run it, then the terms, then what changed. They sit beside the binary rather than in a docs directory, because a directory is one more thing to open.

The value is the path in this repository the file is taken from; the key is where it lands in the archive.

func Sources

func Sources() []string

Sources is every path in this repository a release archive draws from, so a test can check that each one still exists before a tag discovers it does not.

Types

type Platform

type Platform struct {
	// OS is a GOOS: linux, darwin or windows.
	OS string
	// Arch is a GOARCH: amd64 or arm64.
	Arch string
}

Platform is one build target.

func Platforms

func Platforms() []Platform

Platforms is every target a release ships, and therefore every target that is supported. Adding one here is a promise to keep it building.

windows/arm64 is absent on purpose: nobody runs a team server on it, and a binary nobody runs is a binary nobody notices breaking.

func (Platform) String

func (p Platform) String() string

String is "linux/amd64", the spelling the Makefile and the docs use.

Jump to

Keyboard shortcuts

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