viperparser

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeFile      = ""
	EtcdPrefix      = "etcd+"
	SchemeHttp      = "http"
	SchemeHttps     = "https"
	SchemeEtcdHttp  = EtcdPrefix + SchemeHttp
	SchemeEtcdHttps = EtcdPrefix + SchemeHttps
)

Variables

This section is empty.

Functions

func Parse

func Parse(opts ...Option) (v *viper.Viper, err error)

func Unmarshal

func Unmarshal(rawVal any, opts ...Option) error

Types

type Option

type Option func(p *Parser)

func WithEnvFile

func WithEnvFile(envFile string) Option

func WithEnvPrefix

func WithEnvPrefix(envPrefix string) Option

func WithUrl

func WithUrl(url string) Option

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New() *Parser

func (*Parser) Configure

func (p *Parser) Configure(opts ...Option)

func (*Parser) Parse

func (p *Parser) Parse() (err error)

Jump to

Keyboard shortcuts

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