environment

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HomeDir

func HomeDir() string

HomeDir returns the home directory for the current user

func Realpath

func Realpath(path string) (string, error)

Realpath evaluates symbolic links. If the path is not a symbolic link, it returns the cleaned path. Symbolic links with relative paths return error.

func SetCofnigFile

func SetCofnigFile(path string) error

SetCofnigFile

Types

type Paths

type Paths struct {
	// contains filtered or unexported fields
}

func MustGetSrewPaths

func MustGetSrewPaths() Paths

MustGetSrewPaths

func NewPaths

func NewPaths(base string) Paths

NewPaths

func (Paths) BasePath

func (p Paths) BasePath() string

BasePath returns srew base directory.

func (Paths) BinPath

func (p Paths) BinPath() string

e.g. {BasePath}/bin

func (Paths) IndexBase

func (p Paths) IndexBase() string

index and custom ones.

func (Paths) IndexPath

func (p Paths) IndexPath(name string) string

IndexPath returns the directory where a plugin index repository is cloned. e.g. {BasePath}/index/default or {BasePath}/index

func (Paths) InstallPath

func (p Paths) InstallPath() string

e.g. {BasePath}/store

func (Paths) InstallReceiptsPath

func (p Paths) InstallReceiptsPath() string

InstallReceiptsPath returns the base directory where plugin receipts are stored.

e.g. {BasePath}/receipts

func (Paths) PluginInstallPath

func (p Paths) PluginInstallPath(plugin string) string

e.g. {InstallPath}/{version}/{..files..}

func (Paths) PluginInstallReceiptPath

func (p Paths) PluginInstallReceiptPath(plugin string) string

PluginInstallReceiptPath returns the path to the install receipt for plugin.

e.g. {InstallReceiptsPath}/{plugin}.yaml

func (Paths) PluginVersionInstallPath

func (p Paths) PluginVersionInstallPath(plugin, version string) string

PluginVersionInstallPath returns the path to the specified version of specified plugin.

e.g. {PluginInstallPath}/{plugin}/{version}

Jump to

Keyboard shortcuts

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