config

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FatalCheck

func FatalCheck(key string)

FatalCheck checks that a key exists in the viper configuration. If not, it calls fatalf.

func Load

func Load(envPrefix string, configPath string) error

func RequiredEnv

func RequiredEnv(key string) string

RequiredEnv checks that the specified environment variable exists. If not, it calls log.Fatalf.

func RequiredFloat64

func RequiredFloat64(key string) float64

RequiredFloat64 returns the value of the configuration variable specified by key. If that configuration var does not exist, it calls log.Fatalf

func RequiredInt

func RequiredInt(key string) int

RequiredInt returns the value of the configuration variable specified by key. If that configuration var does not exist, it calls log.Fatalf

func RequiredString

func RequiredString(key string) string

RequiredString returns the value of the configuration variable specified by key. If that configuration var does not exist, it calls log.Fatalf

func RequiredStringSlice

func RequiredStringSlice(key string) []string

RequiredStringSlice returns the value of the configuration variable specified by key. If that configuration var does not exist, it calls log.Fatalf

Types

This section is empty.

Jump to

Keyboard shortcuts

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