util

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

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

func AddToPath(path string) (string, error)

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

func AddToPathCmd(sub string, cmd ...string) (string, error)

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

func PathByName(name string) string

Types

type DependencyInstaller

type DependencyInstaller func() (string, error)

type Dirs

type Dirs struct {
	HomeDir   string
	AnkorDir  string
	ConfigDir string
	OptDir    string
	BinDir    string
	TmpDir    string
}

func NewDirs

func NewDirs() Dirs

func (*Dirs) GetAnkorDir

func (d *Dirs) GetAnkorDir() string

func (*Dirs) GetBinDir

func (d *Dirs) GetBinDir() string

func (*Dirs) GetCompletionDir

func (d *Dirs) GetCompletionDir() string

func (*Dirs) GetConfigDir

func (d *Dirs) GetConfigDir() string

func (*Dirs) GetHomeDir

func (d *Dirs) GetHomeDir() string

func (*Dirs) GetLogsDir

func (d *Dirs) GetLogsDir() string

func (*Dirs) GetOptDir

func (d *Dirs) GetOptDir() string

func (*Dirs) GetPluginsDir

func (d *Dirs) GetPluginsDir() string

func (*Dirs) GetTmpDir

func (d *Dirs) GetTmpDir() string

type PluginInfo

type PluginInfo struct {
	Name         *PluginName
	Dependencies []*PluginName
	Fields       map[string]string
}

type PluginName

type PluginName struct {
	Name string
	Type string
}

Directories

Path Synopsis
Package deprecate provides simple functions to standardize the output of deprecation notices on Ankor CLI
Package deprecate provides simple functions to standardize the output of deprecation notices on Ankor CLI
Package gio provides io functions for GoReleaser.
Package gio provides io functions for GoReleaser.
Package golden asserts golden files contents.
Package golden asserts golden files contents.
Package middleware define middlewares for Actions.
Package middleware define middlewares for Actions.
skip
Package skip can skip an entire Action.
Package skip can skip an entire Action.
Package pipes provides generic erros for pipes to use.
Package pipes provides generic erros for pipes to use.
The tomb package handles clean goroutine tracking and termination.
The tomb package handles clean goroutine tracking and termination.
v2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL