Documentation ¶
Overview ¶
Package sconfig is a utility to parse application configurations from environment variables and command line flags.
This package uses https://github.com/spf13/viper under the hood and is compatible with CLI apps built with https://github.com/spf13/cobra.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSpecification = errors.New(
"specification must be a struct pointer")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) FromEnvironment ¶
type ErrInvalidField ¶
func (*ErrInvalidField) Error ¶
func (e *ErrInvalidField) Error() string
type ErrInvalidFlagFormat ¶
type ErrInvalidFlagFormat struct {
Format string
}
func (*ErrInvalidFlagFormat) Error ¶
func (e *ErrInvalidFlagFormat) Error() string
type ErrRequiredFields ¶
type ErrRequiredFields struct {
Fields []string
}
func (*ErrRequiredFields) Error ¶
func (e *ErrRequiredFields) Error() string
type ErrUnsupportedFieldType ¶
type ErrUnsupportedFieldType struct {
Type string
}
func (*ErrUnsupportedFieldType) Error ¶
func (e *ErrUnsupportedFieldType) Error() string
Click to show internal directories.
Click to hide internal directories.