gf: github.com/johng-cn/gf/g/os/genv Index | Files

package genv

import "github.com/johng-cn/gf/g/os/genv"

Package genv provides operations for environment variables of system.

环境变量管理

Index

Package Files

genv.go

func All Uses

func All() []string

func Get Uses

func Get(k string, def ...string) string

获取环境变量,并可以指定当环境变量不存在时的默认值

func Remove Uses

func Remove(k string) error

func Set Uses

func Set(k, v string) error

Package genv imports 1 packages (graph). Updated 2019-01-16. Refresh now. Tools for package owners.