fix bug: etcd should use etcd as adapter name
This commit is contained in:
parent
82919a08e7
commit
b8cf07fa18
@ -1,3 +1,5 @@
|
|||||||
|
# developing
|
||||||
|
- [https://github.com/beego/beego/pull/4845](https://github.com/beego/beego/pull/4845)
|
||||||
# v2.0.2-beta.1
|
# 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)
|
- Add a custom option for whether to escape HTML special characters when processing http request parameters. [4701](https://github.com/beego/beego/pull/4701)
|
||||||
|
|||||||
@ -46,7 +46,7 @@ func newEtcdConfiger(client *clientv3.Client, prefix string) *EtcdConfiger {
|
|||||||
return res
|
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) {
|
func (e *EtcdConfiger) reader(ctx context.Context, key string) (string, error) {
|
||||||
resp, err := get(e.client, e.prefix+key)
|
resp, err := get(e.client, e.prefix+key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -188,5 +188,5 @@ func get(client *clientv3.Client, key string) (*clientv3.GetResponse, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.Register("json", &EtcdConfigerProvider{})
|
config.Register("etcd", &EtcdConfigerProvider{})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user