package
Version:
v0.0.0-...-b3f7bda
Opens a new window with list of versions in this module.
Published: Apr 21, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
All
@Description:获取环境变量
@return []string
Contains
@Description: 判断环境变量key是否存在,存在返回true
@param key
@return bool
func Get(key string, def ...interface{}) interface{}
Get
@Description: 获取指定key的环境变量值,如果不存在且def存在返回第一个def,如果key和def都不存在返回nil
@param key 环境变量key
@param def 默认值
@return interface{}
Map
@Description: 获取环境变量map
@return map[string]string
Remove
@Description: 从环境变量中移除key
@param key
@return err
Set
@Description: 设置环境变量,仅在当前进程有效
@param key
@param value
@return err
SetMap
@Description: 设置环境变量,仅在当前进程有效
@param m
@return err
Source Files
¶
Click to show internal directories.
Click to hide internal directories.