envutils

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

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 5 Imported by: 1

README

env-utils

Golang enviroment variables utilities

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidType = errors.New("Invalid type")

Functions

func FistEnv

func FistEnv(key ...string) (value string)

func Get

func Get(key string, defaul ...string) (value string)

func IsInvalidType

func IsInvalidType(err error) bool

func Pair

func Pair(s string) (key, value string)

Types

type Env

type Env map[string]string

func New

func New() Env

func (*Env) Parse

func (e *Env) Parse(data interface{}, filter ...func(key, value string) bool) (err error)

func (*Env) ParseString

func (e *Env) ParseString(data string, filter ...func(key, value string) bool)

func (*Env) ParseValue

func (e *Env) ParseValue(s string, filter ...func(key, value string) bool)

func (*Env) ParseValues

func (e *Env) ParseValues(values []string, filter ...func(key, value string) bool)

func (Env) SetToSys

func (e Env) SetToSys(key ...string)

Jump to

Keyboard shortcuts

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