kubernetesk8s.io/kubernetes/test/e2e/framework/viperconfig Index | Files

package viperconfig

import "k8s.io/kubernetes/test/e2e/framework/viperconfig"

Index

Functions

func ViperizeFlags

func ViperizeFlags(requiredConfig, optionalConfig string, flags *flag.FlagSet) error

ViperizeFlags checks whether a configuration file was specified, reads it, and updates the configuration variables in the specified flag set accordingly. Must be called after framework.HandleFlags() and before framework.AfterReadingAllFlags().

The logic is so that a required configuration file must be present. If empty, the optional configuration file is used instead, unless also empty.

Files can be specified with just a base name ("e2e", matches "e2e.json/yaml/..." in the current directory) or with path and suffix.

Source Files

viperconfig.go

Version
v1.17.7
Published
Jun 17, 2020
Platform
js/wasm
Imports
5 packages
Last checked
19 minutes ago

Tools for package owners.