Fix lint and format code in core dir

This commit is contained in:
loyalsoldier
2021-06-06 21:00:27 +08:00
parent ca328208cc
commit 41790b80ac
42 changed files with 75 additions and 109 deletions

View File

@@ -119,7 +119,6 @@ func (e *EtcdConfiger) Sub(key string) (config.Configer, error) {
// TODO remove this before release v2.0.0
func (e *EtcdConfiger) OnChange(key string, fn func(value string)) {
buildOptsFunc := func() []clientv3.OpOption {
return []clientv3.OpOption{}
}
@@ -144,11 +143,9 @@ func (e *EtcdConfiger) OnChange(key string, fn func(value string)) {
rch = e.client.Watch(context.Background(), e.prefix+key, buildOptsFunc()...)
}
}()
}
type EtcdConfigerProvider struct {
}
type EtcdConfigerProvider struct{}
// Parse = ParseData([]byte(key))
// key must be json

View File

@@ -32,7 +32,6 @@ func TestEtcdConfigerProvider_Parse(t *testing.T) {
}
func TestEtcdConfiger(t *testing.T) {
provider := &EtcdConfigerProvider{}
cfger, _ := provider.Parse(readEtcdConfig())