env

package
v0.0.0-...-8699099 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfigInterface

type EnvConfigInterface interface {
	// GetString retrieves a string value from the environment variables.
	GetString(key, fallback string) string

	// GetInt retrieves an integer value from the environment variables.
	GetInt(key string, fallback int) int

	// GetBool retrieves a boolean value from the environment variables.
	GetBool(key string, fallback bool) bool

	// GetStringSlice retrieves a slice of strings from the environment variables.
	GetStringSlice(key string, fallback []string) []string
}

EnvConfigInterface provides methods to retrieve, set, and unset environment variables.

func LoadEnvConfig

func LoadEnvConfig(envFile string) (EnvConfigInterface, error)

LoadEnvConfig initializes the environment configuration by loading environment variables from a .env file.

Jump to

Keyboard shortcuts

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