cfg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG = ".gost.toml"

Name of config file

Variables

View Source
var (
	// The original config info
	GostToml Cfg

	// The list of usable GOPATHs in original order
	PathList []GoPath

	// A GOPATH container for quick access
	PathMap = map[string]*GoPath{}

	// Current working directory.
	WD string

	// Current user's home dir
	UserHome string

	// Path of config file .gost.toml
	ConfigPath string
)

Functions

func LoadTomlCfg

func LoadTomlCfg()

func WriteTomlCfg

func WriteTomlCfg()

Write config info into file

Types

type Cfg

type Cfg struct {
	GoPaths []GoPath `toml:"GoPaths"`
}

type GoPath

type GoPath struct {
	// It's a nick-name for the given GOPATH
	Name string `toml:"name,required"`

	// The GOPATH
	Path string `toml:"path,required"`

	// Normally RealPath is the same with Path, unless
	// Path contains symbolic links. When Path contains
	// symbolic links, RealPath would be the real path
	// that Path finally points to.
	RealPath string `toml:"realPath"`

	// This denotes that if the GOPATH is multiple.
	// (true for yes and false for no)
	Multi bool `toml:"multi"`
}

Jump to

Keyboard shortcuts

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