envs

package
v0.0.0-...-ba0629f Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package envs provides target environment variables of interest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Variables

type Variables struct {
	// contains filtered or unexported fields
}

Variables - collected of targeted environment variables.

func (*Variables) Get

func (ev *Variables) Get(name string) (string, bool)

Get returns an environment variable if it is present in the collection

func (*Variables) GetDefault

func (ev *Variables) GetDefault(name, defVal string) string

GetDefault returns an environment variable or provided default.

func (*Variables) Set

func (ev *Variables) Set(name, val string) bool

Set saves the environment variable if it is targeted. returns true if env variable matches the target

Jump to

Keyboard shortcuts

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