README ¶ xos xos provides useful OS helpers, such as setting environment variables race-free. Install go get oss.terrastruct.com/xos Usage env := xos.NewEnv(os.Environ()) env.Setenv("DEBUG", "1") status := env.Getenv("DEBUG") Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package xos provides useful os helpers. Index ¶ type Env func NewEnv(environ []string) *Env func (e *Env) Bool(name string) (*bool, error) func (e *Env) Environ() []string func (e *Env) Getenv(name string) string func (e *Env) Setenv(name, value string) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Env ¶ type Env struct { // contains filtered or unexported fields } func NewEnv ¶ func NewEnv(environ []string) *Env func (*Env) Bool ¶ func (e *Env) Bool(name string) (*bool, error) func (*Env) Environ ¶ func (e *Env) Environ() []string func (*Env) Getenv ¶ func (e *Env) Getenv(name string) string func (*Env) Setenv ¶ func (e *Env) Setenv(name, value string) Source Files ¶ View all Source files env.go xos.go Click to show internal directories. Click to hide internal directories.