January 2020
Intermediate to advanced
640 pages
16h 56m
English
The Gopkg.toml file serves as a manifest for controlling the dep tool's behavior. The dep init invocation will analyze the import graph of the project and produce a Gopkg.toml file with an initial set of constraints. From that point on, whenever a constraint needs to be updated (usually to bump the minimum supported version), users need to manually modify the generated Gopkg.toml file.
So what does the content of a Gopkg.toml file look like? Gopkg.toml files are composed of a list of blocks or stanzas. Each stanza contains one of the dep-supported rule types. The most frequently used rule types are as follows: