envs

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package envs provides utilities to get environment variables.

Index

Constants

This section is empty.

Variables

View Source
var (
	// EnvPrefix is the key prefix of the environment variable value
	EnvPrefix = "KWOK_"
)

Functions

func GetEnv

func GetEnv[T any](key string, def T) T

GetEnv returns the value of the environment variable named by the key.

func GetEnvWithPrefix

func GetEnvWithPrefix[T any](key string, def T) T

GetEnvWithPrefix returns the value of the environment variable named by the key with kwok prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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