Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDotEnvExample ¶ added in v1.0.9
func FindDotEnvExample() string
FindDotEnvExample tries to locate a .env.example (template) file. It does NOT load it into process env (templates often contain placeholders). FindDotEnvExample 会尝试定位 .env.example(模板)文件路径。 注意:不会加载模板到进程环境变量(模板通常是占位符,直接加载反而会误导)。
func LoadDotEnv ¶
LoadDotEnv 会尝试加载固定路径的 .env 文件到进程环境变量中(仅填充尚未设置的 key)。 返回:成功加载的 .env 路径(若未找到则为空)。
Types ¶
This section is empty.
Source Files
¶
- creds.go
- dotenv.go
Click to show internal directories.
Click to hide internal directories.