Documentation
¶
Overview ¶
Package tidy takes out of a package definition what a release can be read for.
A definition is written once, by the conversion or by a person, and read by every generation after that. What it should say is the part a release can't answer -- which assets are the command, which of its files is the executable, who signs it -- because everything else is read off the release each time and a definition repeating it is a copy that can go out of date without anybody touching it.
The definitions written before that was true still say the rest, so this takes it out.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Removed ¶ added in v0.0.39
type Removed struct {
// Spellings are the replacements that went, as "<platform>: <spelling>".
Spellings []string
// Checksums is how many checksum blocks went.
Checksums int
// Overrides is how many overrides went for saying nothing.
Overrides int
// VariantAssets is how many variants' assets went for saying their libc in the name.
VariantAssets int
}
Removed is what a tidying took out of a definition.
func Definition ¶ added in v0.0.39
Definition takes out of a definition what it doesn't have to say: the spellings the parser works out for itself, where the checksum file is, and an override left saying nothing but which environment it is for. It says what went.
The file is edited as a syntax tree rather than read into a definition and written back out. A package's definition is a file a maintainer edits: the comment saying why a filter is there is the most valuable line in it, and re-rendering would drop it while claiming to have tidied up.
Every replacements block is reached, wherever it is: the definition's own, each version_override's, and each override's within them. A block left with nothing goes altogether rather than staying as an empty map.