envutil

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(key string, def bool) bool

func Duration

func Duration(key string, def time.Duration) time.Duration

func FirstStringOrSecretFile

func FirstStringOrSecretFile(keys []string, def string) (string, error)

func Float

func Float(key string, def float64) float64

func Int

func Int(key string, def int) int

func List

func List(key string) []string

func ListWithFallback

func ListWithFallback(key, fallback string) []string

func LoadDotenv

func LoadDotenv(opts DotenvOptions) error

LoadDotenv는 service env file과 local dotenv 후보를 옵션에 맞춰 로드한다.

func LoadDotenvFile

func LoadDotenvFile(path string, required bool, strict bool) error

LoadDotenvFile는 dotenv 파일을 로드하며 strict 모드에서 symlink와 world-accessible 파일을 거부한다.

func Map

func Map(key string) map[string]string

func ServiceDotenvPath

func ServiceDotenvPath(serviceName string) string

ServiceDotenvPath는 OpenBao Agent dotenv 렌더링 기본 경로를 반환한다.

func String

func String(key, def string) string

func StringAny

func StringAny(keys ...string) string

func StringOrFile

func StringOrFile(key, def string) string

func StringOrSecretFile

func StringOrSecretFile(key, def string) (string, error)

func StringRaw

func StringRaw(key, def string) string

Types

type DotenvOptions

type DotenvOptions struct {
	ServiceName    string
	LocalEnableKey string
	LocalPathKey   string
	LocalPaths     []string
}

DotenvOptions는 service-prefix와 local dotenv 로딩 규칙을 지정한다.

Jump to

Keyboard shortcuts

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