envflag

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package envflag resolves a setting that a command-line flag and an environment variable can both supply.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(given, value bool, env string) bool

Bool resolves a boolean setting. A flag given on the command line wins over the environment variable, so --flag=false turns the setting off even when the environment turns it on. Without the flag, the setting is on only when the variable is exactly "true".

Types

This section is empty.

Jump to

Keyboard shortcuts

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