Documentation
¶
Index ¶
- type Dirs
- type Env
- func (e *Env) Command(name string, args ...string) *osexec.Cmd
- func (e *Env) CommandContext(ctx context.Context, name string, args ...string) *osexec.Cmd
- func (e *Env) Environ() []string
- func (e *Env) LookPath(file string) (string, error)
- func (e *Env) PrependBinToPATH() error
- func (e *Env) PrependBinToPATHForDataRoot(dataRoot string) error
- func (e *Env) WithBinPath(env []string) []string
- func (e *Env) WithConfigRoot(env []string) []string
- type PathsConfig
- func (c *PathsConfig) BinDir(root string) string
- func (c *PathsConfig) BinDirForDataRoot(dataRoot string) (string, error)
- func (c *PathsConfig) DataRoot(root string) string
- func (c *PathsConfig) DefaultDataRoot() (string, error)
- func (c *PathsConfig) DefaultRoot() (string, error)
- func (c *PathsConfig) HomeBinDir() (string, error)
- func (c *PathsConfig) HomeDataRoot() (string, error)
- func (c *PathsConfig) HomeRoot() (string, error)
- func (c *PathsConfig) Resolve(rootFlag string) (Dirs, error)
- func (c *PathsConfig) ResolveDataRoot(rootFlag string) (string, error)
- func (c *PathsConfig) RootFromDataRoot(dataRoot string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
Paths *PathsConfig
ConfigRootEnvKey string
}
func NewEnv ¶
func NewEnv(paths *PathsConfig, configRootEnvKey string) *Env
func (*Env) CommandContext ¶
func (*Env) PrependBinToPATH ¶
func (*Env) PrependBinToPATHForDataRoot ¶
func (*Env) WithBinPath ¶
func (*Env) WithConfigRoot ¶
type PathsConfig ¶
func (*PathsConfig) BinDir ¶
func (c *PathsConfig) BinDir(root string) string
func (*PathsConfig) BinDirForDataRoot ¶
func (c *PathsConfig) BinDirForDataRoot(dataRoot string) (string, error)
func (*PathsConfig) DataRoot ¶
func (c *PathsConfig) DataRoot(root string) string
func (*PathsConfig) DefaultDataRoot ¶
func (c *PathsConfig) DefaultDataRoot() (string, error)
func (*PathsConfig) DefaultRoot ¶
func (c *PathsConfig) DefaultRoot() (string, error)
func (*PathsConfig) HomeBinDir ¶
func (c *PathsConfig) HomeBinDir() (string, error)
func (*PathsConfig) HomeDataRoot ¶
func (c *PathsConfig) HomeDataRoot() (string, error)
func (*PathsConfig) HomeRoot ¶
func (c *PathsConfig) HomeRoot() (string, error)
func (*PathsConfig) ResolveDataRoot ¶
func (c *PathsConfig) ResolveDataRoot(rootFlag string) (string, error)
func (*PathsConfig) RootFromDataRoot ¶
func (c *PathsConfig) RootFromDataRoot(dataRoot string) (string, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package toolresolve provides centralized binary resolution that respects both the system PATH, the well-known extra install paths (e.g.
|
Package toolresolve provides centralized binary resolution that respects both the system PATH, the well-known extra install paths (e.g. |
Click to show internal directories.
Click to hide internal directories.