Documentation ¶
Index ¶
- Variables
- func GenerateMakefile(conf *config.Runtime, path string) error
- func Get(ctx context.Context, conf *config.Runtime, p *program.Lock) error
- func IterateLockfilePrograms(ctx context.Context, conf *config.Runtime, names []string, ...) error
- func Purge(ctx context.Context, conf *config.Runtime, all, dryRun bool) error
- func Sync(ctx context.Context, conf *config.Runtime, writeToStdout bool) error
- func UpdateIgnoreFile(conf *config.Runtime, path string) error
- func Verify(ctx context.Context, conf *config.Runtime, prog *program.Lock) error
- type ProgramCommandFunc
Constants ¶
This section is empty.
Variables ¶
var ErrFailExec = errors.New("failed to execute command, please troubleshoot logs")
ErrFailExec is used as generic failure for command line interface as preserving the real error can be difficult with concurrent setup.
Functions ¶
func GenerateMakefile ¶
GenerateMakefile writes a generated Makefile blindly (overwrites).
func Get ¶
Get implements ProgramCommandFunc, therefore needs to be concurrent-safe. Before downloading, Get attempts to: - validate the existing installation - if it failed, redo symlink, then validate again - if it still fails, then attempt to download This is useful when a project is working on branches with different versions of a given program, ensuring that we only download when absolutely necessary.
func IterateLockfilePrograms ¶
func IterateLockfilePrograms(ctx context.Context, conf *config.Runtime, names []string, fn ProgramCommandFunc) error
IterateLockfilePrograms is an iterator which spawns a goroutine for each selected programs. Any subcommand can leverage this by honoring ProgramCommandFunc.
func Purge ¶
Purge deletes downloaded binaries. By default, it only deletes downloaded binaries which no longer mentioned by the lockfile. Passing `all` will ignore lockfile check and deletes all programs.
func Sync ¶
Sync reads the configuration file (conf.Path) and generates the lockfile (conf.LockfilePath). By default, it overwrites the lockfile blindly. If `writeToStdout` is true, then it writes to STDOUT and lockfile will not be touched.
func UpdateIgnoreFile ¶
UpdateIgnoreFile appends bindl ignore entries if none exist.