Documentation
¶
Overview ¶
Package fetch downloads the tools and releases the modlock command needs into the user cache.
Index ¶
- func Cache(name ...string) (string, error)
- func File(ctx context.Context, url, path string) error
- func Install(dir string, fill func(staging string) error) error
- func Release(version, asset string) string
- func Untar(archive, name, target string) error
- func UntarTree(archive, prefix, dir string) error
- func Unzip(archive, name, target string) error
- func Verify(path, sum string) error
- func WalkTar(archive string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install fills dir once: it runs fill on a staging path beside dir and moves the result into place whole, so an interrupted install never looks complete. It does nothing when dir exists. Each install stages in a directory of its own, so installs of one dir may run at once, in one process or several; the first to finish installs, and the rest find dir in place. fill may keep scratch files, such as a downloaded archive, at staging plus a suffix: they share the private directory, which Install removes.
func UntarTree ¶ added in v0.1.4
UntarTree writes the regular files under the directory prefix in the gzipped tar archive into dir, keeping their paths below prefix and their modes. An empty prefix writes every file.
Types ¶
This section is empty.