env

package
v0.0.0-...-a387ffb Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration

func Duration(name string, value time.Duration) time.Duration

Duration returns the value of the environment variable "name" as a time.Duration where the value of the environment variable is parsed as a duration string as defined in the Go stdlib time documentation. e.g. 5m30s. If name is not set, it returns value. Ref: https://golang.org/pkg/time/#ParseDuration

func Int

func Int(name string, value int) int

Int returns the value of the environment variable "name" as an int. If name is not set, it returns value.

func String

func String(name string, value string) string

String returns the value of the environment variable "name". If name is not set, it returns value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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