Documentation ¶
Index ¶
- Variables
- func GetDefaultBinDir() string
- func WithBinDir(dir string) func(*App) error
- func WithDiscard() func(*App) error
- func WithLogLevel(l string) func(*App) error
- type App
- func (a *App) CreateShimFor(dist string) error
- func (a *App) Execute(args []string)
- func (a *App) GetAvailableVersionsFor(dist string) []string
- func (a *App) GetInstalledVersionsFor(dist string) []string
- func (a *App) GetMostRecent(dist string) string
- func (a *App) GetPackagesListWithPrefix(pfix string) []string
- func (a *App) GuessBestVersionFor(dist, dir, stop string, versions []string) (string, string)
- func (a *App) GuessBestVersionFor2(dist, dir string, versions []string) (string, string)
- func (a *App) Install(specs ...string) error
- func (a *App) InstallFromLock() error
- func (a *App) Local(distribution, version string) error
- func (a *App) Search(pfix string) []string
- func (a *App) SetBinDir(d string) error
- func (a *App) SetDryRun(v bool)
- func (a *App) SetLogLevel(l string) error
- func (a *App) SetVerbose(v bool)
- func (a *App) Uninstall(specs ...string) error
- func (a *App) Update(definitions, all bool, cache bool, which ...string) error
- func (a *App) Versions(freezemode bool, specs ...string) error
- type Distributions
- type Sources
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAlreadyInstalled is returned when the requested version is already installed ErrAlreadyInstalled = errors.New("version already installed") )
Functions ¶
func WithBinDir ¶
WithBinDir sets the binaries directory
func WithLogLevel ¶
WithLogLevel sets the binaries directory
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App implements the core logic
func (*App) CreateShimFor ¶
CreateShimFor creates a shim for the distribution
func (*App) GetAvailableVersionsFor ¶
GetAvailableVersionsFor returns a list of versions available for distribution
func (*App) GetInstalledVersionsFor ¶
GetInstalledVersionsFor returns a sorted list of versionsfor distribution
func (*App) GetMostRecent ¶
GetMostRecent returns the most recent stable available version
func (*App) GetPackagesListWithPrefix ¶
GetPackagesListWithPrefix returns a list of packages that starts with prefix
func (*App) GuessBestVersionFor ¶
GuessBestVersionFor returns closest version requirement given a location, a distribution and a version list. If no match we return the latest version we have
func (*App) GuessBestVersionFor2 ¶ added in v0.2.16
GuessBestVersionFor2 returns closest version requirement given a location, a distribution and a version list. If no match we return the latest version we have
func (*App) InstallFromLock ¶ added in v0.2.15
InstallFromLock install distributions/versions to match the local .binenv.lock file
func (*App) Search ¶ added in v0.8.0
Search show a list returns a list of packages contains string in name or description
func (*App) SetLogLevel ¶
SetLogLevel sets the log level to use
func (*App) SetVerbose ¶ added in v0.2.14
SetVerbose sets the log level to debug
type Distributions ¶
Distributions holds the liste of available software sources