Documentation ¶
Index ¶
- Constants
- Variables
- func AddToPath(path string) (string, error)
- func AddToPathCmd(sub string, cmd ...string) (string, error)
- func CreateConfigFromSourceTemplate(source, target string, data map[string]interface{}) error
- func CreateConfigFromTemplate(name string, data map[string]interface{}) error
- func CreateFromSourceTemplate(source, target string, t embed.FS, data map[string]interface{}) error
- func GetPath(name string, installers ...DependencyInstaller) string
- func IsBrewInstallation() bool
- func PathByName(name string) string
- type DependencyInstaller
- type Dirs
- func (d *Dirs) GetAnkorDir() string
- func (d *Dirs) GetBinDir() string
- func (d *Dirs) GetCompletionDir() string
- func (d *Dirs) GetConfigDir() string
- func (d *Dirs) GetHomeDir() string
- func (d *Dirs) GetLogsDir() string
- func (d *Dirs) GetOptDir() string
- func (d *Dirs) GetPluginsDir() string
- func (d *Dirs) GetTmpDir() string
- type PluginInfo
- type PluginName
Constants ¶
View Source
const (
Homebrew = "homebrew"
)
Variables ¶
View Source
var ( AppName = "ankor" TemplateFS embed.FS Force bool )
View Source
var (
ErrMissingExecutable = errors.New("must be installed on your system and available in your $PATH")
)
Functions ¶
func AddToPath ¶
AddToPath attempts to add supplied path to the systems shell environment as well as adding it to the os.Environ for teh current run.
func AddToPathCmd ¶
AddToPathCmd will use the supplied cmd to retrieve the value for a path and add the sub suffix to the pat for adding to PATH.
func GetPath ¶
func GetPath(name string, installers ...DependencyInstaller) string
GetPath attempts to retrieve path for specified executable name.
func IsBrewInstallation ¶
func IsBrewInstallation() bool
func PathByName ¶
Types ¶
type DependencyInstaller ¶
type Dirs ¶
type Dirs struct { HomeDir string AnkorDir string ConfigDir string OptDir string BinDir string TmpDir string }
func (*Dirs) GetAnkorDir ¶
func (*Dirs) GetCompletionDir ¶
func (*Dirs) GetConfigDir ¶
func (*Dirs) GetHomeDir ¶
func (*Dirs) GetLogsDir ¶
func (*Dirs) GetPluginsDir ¶
type PluginInfo ¶
type PluginInfo struct { Name *PluginName Dependencies []*PluginName Fields map[string]string }
type PluginName ¶
Click to show internal directories.
Click to hide internal directories.