envr

package module
v0.0.0-...-a8d11c3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenAssign  = byte('=')
	TokenNewLine = byte('\n')
)

Variables

This section is empty.

Functions

func EnvFileToMap

func EnvFileToMap(fp string) (map[string]string, error)

func PairsToMap

func PairsToMap(pairs []StringPair) map[string]string

Types

type Cmd

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

func CreateCmd

func CreateCmd() *Cmd

func (*Cmd) Env

func (c *Cmd) Env() map[string]string

func (*Cmd) Run

func (cmd *Cmd) Run() error

func (*Cmd) SetArgs

func (c *Cmd) SetArgs(a string) *Cmd

func (*Cmd) SetBin

func (c *Cmd) SetBin(b string) *Cmd

func (*Cmd) SetEnv

func (c *Cmd) SetEnv(k, v string)

func (*Cmd) SetEnvFromMap

func (c *Cmd) SetEnvFromMap(m map[string]string) *Cmd

type StringPair

type StringPair struct {
	First  string
	Second string
}

func ParseEnvFileToPairArray

func ParseEnvFileToPairArray(r io.Reader) ([]StringPair, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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