env

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package env is responsible for loading radiance configuration based on a order of precedence (environment variables > configurations set at .env file).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](key Key) (T, bool)

Get retrieves the value associated with the given key and attempts to cast it to type T. If the key does not exist or the type does not match, it returns the zero value of T and false.

Types

type Key

type Key = string
const (
	LogLevel      Key = "RADIANCE_LOG_LEVEL"
	LogPath       Key = "RADIANCE_LOG_PATH"
	DataPath      Key = "RADIANCE_DATA_PATH"
	DisableFetch  Key = "RADIANCE_DISABLE_FETCH_CONFIG"
	PrintCurl     Key = "RADIANCE_PRINT_CURL"
	DisableStdout Key = "RADIANCE_DISABLE_STDOUT_LOG"
	ENV           Key = "RADIANCE_ENV"

	Testing Key = "RADIANCE_TESTING"
)

Jump to

Keyboard shortcuts

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