config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context) *v1.ConfigSpec

func InitConfig

func InitConfig() (*v1.ConfigSpec, error)

InitConfig finds and merges CLI configurations in the following order: system dir, home dir, current dir, ENV vars, command-line arguments https://dev.to/techschoolguru/load-config-from-file-environment-variables-in-golang-with-viper-2j2d https://medium.com/@bnprashanth256/reading-configuration-files-and-environment-variables-in-go-golang-c2607f912b63

func ReadAndMergeConfigsFromDirs added in v0.3.0

func ReadAndMergeConfigsFromDirs(dirs []string) (*v1.Config, error)

func SetConfig

func SetConfig(ctx context.Context, conf *v1.ConfigSpec) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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