xos

package module
v0.0.0-...-5fb84d5 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: BSD-3-Clause Imports: 3 Imported by: 3

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")

Documentation

Overview

Package xos provides useful os helpers.

Index

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)

Jump to

Keyboard shortcuts

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