Skip to content

zander-84/go-components

Repository files navigation

go components

组件通过配置文件更新

package main

import (
    "github.com/zander-84/go-components"
    "github.com/fsnotify/fsnotify"
    "github.com/spf13/viper"
)

func main(){
    c := C.NewComponents("./")
    c.Conf().Obj().(*viper.Viper).OnConfigChange(func(in fsnotify.Event) {
        c.Conf().ReloadBasicConf()
        c.Notify()
    })
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages