xybor founder Go Reference GitHub Repo stars GitHub top language GitHub go.mod Go version GitHub release (release name instead of tag name) Codacy Badge Codacy Badge Go Report

Introduction

Package xyconfig supports to manage configuration files and real-time event-oriented watching.

Indevelopment features

xylog.Read(`{"general": {"timeout": 3.14}}`)
xylog.ReadFile("config/default.ini")
xylog.ReadFile("config/override.yml")

xylog.Watch("general.timeout", func (a any) {
    xycond.AssertIs(a, reflect.Float64)
    var timeout = a.(float64)
    SetTimeoutToSomeThing(timeout)
})

xylog.Watch("general", func(a any) {
    xycond.AssertSame(a, &xylog.Config{})
    var config = a.(*xylog.Config)
    var timeout = config.GetFloat("timeout")
    SetTimeoutToSomething(timeout)
})

GitHub

View Github