env

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (

	//env存储方式
	StoreTypeEnv = iota
	StoreTypeDataManage
)

Variables

This section is empty.

Functions

func Get

func Get(k string, defaultVal string) string

func LoadEnv

func LoadEnv(filenames ...string) (err error)

加载.env文件,支持多个env文件,但不覆盖已经在的key值

func LoadEnv2DataManage

func LoadEnv2DataManage(filenames ...string) (err error)

func Overload

func Overload(filenames ...string) (err error)

加载.env文件,支持多个env文件,会覆盖已经在的key值

func OverloadEnv2DataManage

func OverloadEnv2DataManage(filenames ...string) (err error)

func Parse

func Parse(r io.Reader) (envMap map[string]string, err error)

func Set

func Set(k, v string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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