env

package
v2.4.0-dev Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 1 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(name string) string

Get is a wrapper around os.Getenv that validates the environment variable against a list of supported environment variables.

When a environment variable is not supported because it is not listed in the list of supported environment variables, the function will log an error and behave as if the environment variable was not set.

In testing mode, the reader will automatically add the environment variable to the configuration file.

This function is a passthrough to the internal env package.

func Lookup

func Lookup(name string) (string, bool)

Lookup is a wrapper around os.LookupEnv that validates the environment variable against a list of supported environment variables.

When a environment variable is not supported because it is not listed in the list of supported environment variables, the function will log an error and behave as if the environment variable was not set.

In testing mode, the reader will automatically add the environment variable to the configuration file.

This function is a passthrough to the internal env package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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