paths

package
v0.0.0-...-ced39b3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// UNIXHOMEVAR holds the name of the home variable in unix.
	UNIXHOMEVAR = "HOME"
	// UNIXDEFAULTXDGDATAREL holds the default relative path for
	// xdg data (relative to $HOME)
	UNIXDEFAULTXDGDATAREL = ".local/share"
	// UNIXXDGDATAHOME holds the name of the variable that might contain
	// the path to XDG data home.
	UNIXXDGDATAHOME = "XDG_DATA_HOME"

	// PATHSEPARATOR holds the character used to separate PATH members.
	PATHSEPARATOR = ":"

	// GOWORKONNAME holds the name of goworkon xdg folder
	GOWORKONNAME = "goworkon"
	// CONFIGSFOLDER holds the name of the envs configuration folder
	// inside goworkon xdg home.
	CONFIGSFOLDER = "configs"
	// INSTALLSFOLDER holds the name of the go install s folder insde
	// goworkon xdg home.
	INSTALLSFOLDER = "installs"
)

Variables

This section is empty.

Functions

func GoPathBin

func GoPathBin(goPath string) string

GoPathBin is a convenience function that returns the bin folder of a given GOPATH.

func PATHInsert

func PATHInsert(currentPath string, newMembers ...string) string

PATHInsert returns a string representing PATH after inserting <newMembers> at the beginning and removing them from other positions if they exist.

func XdgData

func XdgData() (string, error)

XdgData returns the most likely place for XDG data to be this will most likely notwork in windows.

func XdgDataConfig

func XdgDataConfig() (string, error)

XdgDataConfig returns the folder where config should be stored for environments.

func XdgDataGoInstalls

func XdgDataGoInstalls() (string, error)

XdgDataGoInstalls returns the folder where go installs should live.

func XdgDataGoInstallsBinForVerson

func XdgDataGoInstallsBinForVerson(goVersion string) (string, error)

XdgDataGoInstallsBinForVerson returns the bin path of the given go version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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