config

package module
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 5 Imported by: 0

README

config

Config wrapper library based on viper.

Installing

go get github.com/alexferl/x/config

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{
		AppName:      "app",
		EnvName:      "dev",
		EnvVarPrefix: "app",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName      string
	EnvName      string
	EnvVarPrefix string
}

Config holds all global configuration for our program

func New

func New() *Config

New creates a Config instance

func (*Config) BindFlags

func (c *Config) BindFlags(flagSets ...func(fs *pflag.FlagSet)) error

BindFlags normalizes and parses the command line flags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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