xos

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT 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 GetBoolEnv

func GetBoolEnv(key string, fallback bool) bool

GetBoolEnv returns the boolean 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 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

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