flagutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeEnvFileAndOSEnv added in v1.2.0

func MergeEnvFileAndOSEnv(envFile []string, env []string) ([]string, error)

MergeEnvFileAndOSEnv combines environment variables from `--env-file` and `--env`. Pass an empty slice if any arg is not used.

func ReplaceOrAppendEnvValues

func ReplaceOrAppendEnvValues(defaults, overrides []string) []string

ReplaceOrAppendEnvValues returns the defaults with the overrides either replaced by env key or appended to the list FYI: https://github.com/containerd/containerd/blob/698622b89a053294593b9b5a363efff7715e9394/oci/spec_opts.go#L186-L222 defaults should have valid `k=v` strings. overrides may have the following formats: `k=v` (override k), `k=` (emptify k), `k` (remove k).

Types

This section is empty.

Jump to

Keyboard shortcuts

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