config

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(source string, v any) error

func Registry

func Registry(name string, unmarshal DecodeFunc, exts ...string)

Types

type ConfigFile

type ConfigFile string

type ConfigFileValue

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

func (*ConfigFileValue) Set

func (b *ConfigFileValue) Set(s string) (err error)

func (*ConfigFileValue) String

func (b *ConfigFileValue) String() string

func (*ConfigFileValue) Type

func (b *ConfigFileValue) Type() string

type DecodeFunc

type DecodeFunc = func(value any) ReadFunc

type DecoderFactory

type DecoderFactory map[string]DecodeFunc

func (DecoderFactory) Decode

func (f DecoderFactory) Decode(source string, v any) (err error)

func (DecoderFactory) Register

func (f DecoderFactory) Register(name string, decodeFunc DecodeFunc, exts ...string)

type ReadFunc

type ReadFunc = func(data []byte) (err error)

Directories

Path Synopsis
ini module
json module
yaml module

Jump to

Keyboard shortcuts

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