xos

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package xos provides extensions for Go's standard os package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDurationEnv

func GetDurationEnv(key string, fallback time.Duration) time.Duration

GetDurationEnv returns the time.Duration value of the environment variable named by the key.

If the variable is present in the environment the value (which may be empty) or if the variable is unset, a fallback value is returned.

func GetEnv

func GetEnv(key, fallback string) string

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

If the variable is present in the environment the value (which may be empty) or if the variable is unset, a fallback value is returned.

func GetIntEnv added in v1.1.0

func GetIntEnv(key string, fallback int) int

GetIntEnv returns the integer value of the environment variable named by the key.

If the variable is present in the environment the value (which may be empty) or if the variable is unset, a fallback value is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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