Documentation ¶
Index ¶
- func Get(src any, path string) (any, error)
- type GYAML
- func (y *GYAML) Bool(path string) (bool, error)
- func (y *GYAML) DBool(path string, defaults ...bool) bool
- func (y *GYAML) DFloat64(path string, defaults ...float64) float64
- func (y *GYAML) DInt(path string, defaults ...int) int
- func (y *GYAML) DList(path string, defaults ...[]any) []any
- func (y *GYAML) DMap(path string, defaults ...map[string]any) map[string]any
- func (y *GYAML) DString(path string, defaults ...string) string
- func (y *GYAML) Data() any
- func (y *GYAML) Float64(path string) (float64, error)
- func (y *GYAML) Get(path string) (*GYAML, error)
- func (y *GYAML) Int(path string) (int, error)
- func (y *GYAML) List(path string) ([]any, error)
- func (y *GYAML) Map(path string) (map[string]any, error)
- func (y *GYAML) String(path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GYAML ¶
type GYAML struct {
// contains filtered or unexported fields
}
GYAML represents a complex internal YAML structure with convenient access methods, using dotted path syntax
func ParseJsonFile ¶
ParseJsonFile reads a JSON configuration from the given filename.
func ParseYamlBytes ¶
ParseYamlBytes reads a YAML configuration from the given []byte.
func ParseYamlFile ¶
ParseYamlFile reads a YAML configuration from the given filename.
func (*GYAML) DFloat64 ¶
DFloat64 returns a float64 according to a dotted path or default value or 0.
func (*GYAML) DMap ¶
DMap returns a map[string]any according to a dotted path or default or map[string]any.
Click to show internal directories.
Click to hide internal directories.