envconf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package envconf reads configuration values from the process environment.

It deliberately stops at parsing single values: which variables an application reads, their defaults and how they relate to each other is a decision of that application, not of this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSV

func CSV(
	value string,
) []string

CSV splits a comma separated value, trimming each entry and dropping the empty ones.

func Duration

func Duration(
	name string,
	fallback time.Duration,
) (time.Duration, error)

Duration parses name as a Go duration, or returns fallback when it is unset or blank.

func Int32

func Int32(
	name string,
	fallback int32,
) (int32, error)

Int32 parses name as a 32 bit integer, or returns fallback when it is unset or blank.

func String

func String(
	name string,
	fallback string,
) string

String returns the trimmed value of name, or fallback when it is unset or blank.

func Value

func Value(
	name string,
) string

Value returns the trimmed value of name, or the empty string when it is unset or blank.

Types

This section is empty.

Jump to

Keyboard shortcuts

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