viper

package
v2.0.40 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config the default setting hierarchy looks like below:

...
setting/app/<app>/<app>.test.toml
setting/dapr/*
...

Index

Constants

This section is empty.

Variables

Functions

func New

func New(app, env string, options ...Option) (intf.ConfigProvider, error)

New 初始化config provider

Types

type Option

type Option func(loader *viperConfigLoader)

func WithConfigContent

func WithConfigContent(content string) Option

func WithConfigDir

func WithConfigDir(args ...string) Option

func WithConfigFile

func WithConfigFile(filepath string) Option

func WithConfigFilename

func WithConfigFilename(filename string) Option

func WithConfigType

func WithConfigType(configType string) Option

func WithEnvPrefix

func WithEnvPrefix(envPrefix string) Option

func WithRootDir

func WithRootDir(rootDir string) Option

Jump to

Keyboard shortcuts

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