-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何实现自动保存,或者set回调以实现自动保存 #61
Labels
Comments
保存到文件吗? |
大部分情况下都需要可写 有一个onset回调来写回缓存并保存文件 这个库实现很完美 唯独缺了这个 如果有手动保存模式和自动保存模式很好 单独的write太过繁琐了 |
它有任何进度吗,或者需要我帮住吗,我也可以提交 |
暂时没有时间改进这个。你能发个PR最好了 👍 |
添加了一个简单的事件触发。可以看看: 在创建配置时添加钩子函数: hookFn := func(event string, c *Config) {
fmt.Println("fire the:", event)
}
c := NewWithOptions("test", WithHookFunc(hookFn))
// for global config
config.WithOptions(WithHookFunc(hookFn)) 之后, 当调用
|
thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如何实现自动保存,或者set回调以实现自动保存
The text was updated successfully, but these errors were encountered: