config

package
v0.0.0-...-89dfdfc Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory() string

func SetDirectory

func SetDirectory(dir string)

func SetEmbed

func SetEmbed(embed embed.FS)

Types

type Config

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

func NewConfig

func NewConfig(prefix string) *Config

func (*Config) Get

func (c *Config) Get(key string) *Config

func (*Config) Set

func (c *Config) Set(key string, value interface{}) *Config

func (*Config) SetDefault

func (c *Config) SetDefault(key string, value interface{}) *Config

func (*Config) Value

func (c *Config) Value() interface{}

type MyFS

type MyFS struct {
	afero.FromIOFS
}

func (MyFS) Open

func (receiver MyFS) Open(name string) (afero.File, error)

Open will be overridden to strip the "/" away since viper will use an absolute path

func (MyFS) Stat

func (receiver MyFS) Stat(name string) (os.FileInfo, error)

Stat will be overridden to strip the "/" away since viper will use an absolute path

Jump to

Keyboard shortcuts

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