helpers

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionalEnv

func OptionalEnv(name string) string

OptionalEnv returns the value for environment variable if it exists, otherwise returns an empty string.

func OptionalEnvOrDefault

func OptionalEnvOrDefault(name, defaultValue string) string

OptionalEnvOrDefault returns the value for environment variable if it exists, otherwise returns the default value.

func RequireEnv

func RequireEnv(name string) (string, error)

RequireEnv requires environment variable to be present. The constraint can be verified only during execution of the workspace build (determined with env `CODER_WORKSPACE_BUILD_ID`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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