conf

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagConfigPath

func FlagConfigPath(path ...string) string

func InitialNullVal added in v0.3.9

func InitialNullVal(v interface{}) error

NullVal if tag have null, field[i] set golang default value

func MarshalToFile

func MarshalToFile(config interface{}, filename string) error

MarshalToFile struct to file

func ParseDefaultVal added in v0.3.9

func ParseDefaultVal(v interface{}) error

ParseDefaultVal if tag have defValTag, field[i] setting defval="" value

func PrintJSON

func PrintJSON(config interface{}) (string, error)

PrintJSON print JSON string, null tag, will hide

func ReadConfig

func ReadConfig(filename string, config interface{}) error

ReadConfig read config filename

func UnmarshalDefaultVal

func UnmarshalDefaultVal(config interface{}) error

UnmarshalDefaultVal struct, 'defval' tag to default value

Types

This section is empty.

Jump to

Keyboard shortcuts

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