envx

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package envx 提供环境变量相关工具

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key, fallback string) string

Get 读取环境变量,支持默认值

func GetBool

func GetBool(key string) bool

GetBool 读取环境变量,并自动转换为 bool 类型 true: 1, t, T, TRUE, true, True false: 0, f, F, FALSE, false, False 其他情况返回 false

func MustGet

func MustGet(key string) string

MustGet 读取环境变量,若不存在则 panic

Types

This section is empty.

Jump to

Keyboard shortcuts

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