conf

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DevMode

func DevMode(field string)

func Get

func Get[T value](name string) (t T)

func ProjectPath

func ProjectPath() (path string)

ProjectPath return project path

func Unmarshal

func Unmarshal(v any)

func UnmarshalField

func UnmarshalField(name string, v any)

Types

type Config

type Config struct {
	// different devMode yaml data
	YamlS []*Yaml
	// contains filtered or unexported fields
}

func Configger

func Configger(params ...string) *Config

Configger single config

func NewConfig

func NewConfig(params ...string) *Config

NewConfig new Config load all devMode yaml data

func (*Config) Get

func (c *Config) Get(name string) (value any)

Get yaml data find the first data, must different from app.yaml

func (*Config) Unmarshal

func (c *Config) Unmarshal(s any)

func (*Config) UnmarshalField

func (c *Config) UnmarshalField(name string, s any)

UnmarshalField yaml to struct only support Accessible Field

type Yaml

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

func (*Yaml) Get

func (c *Yaml) Get(name string) any

func (*Yaml) Unmarshal

func (c *Yaml) Unmarshal(data any, s any)

Jump to

Keyboard shortcuts

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