fix bug: etcd should use etcd as adapter name

This commit is contained in:
Deng Ming 2022-01-09 16:49:11 +08:00
parent 82919a08e7
commit b8cf07fa18
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,5 @@
# developing
- [https://github.com/beego/beego/pull/4845](https://github.com/beego/beego/pull/4845)
# v2.0.2-beta.1
- Add a custom option for whether to escape HTML special characters when processing http request parameters. [4701](https://github.com/beego/beego/pull/4701)

View File

@ -46,7 +46,7 @@ func newEtcdConfiger(client *clientv3.Client, prefix string) *EtcdConfiger {
return res
}
// reader is an general implementation that read config from etcd.
// reader is a general implementation that read config from etcd.
func (e *EtcdConfiger) reader(ctx context.Context, key string) (string, error) {
resp, err := get(e.client, e.prefix+key)
if err != nil {
@ -188,5 +188,5 @@ func get(client *clientv3.Client, key string) (*clientv3.GetResponse, error) {
}
func init() {
config.Register("json", &EtcdConfigerProvider{})
config.Register("etcd", &EtcdConfigerProvider{})
}