Skip to content

Commit

Permalink
Try to Fix bug #33
Browse files Browse the repository at this point in the history
  • Loading branch information
evildecay committed Nov 28, 2019
1 parent 32298dc commit 02f3c76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/etcdkeeper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ func get(w http.ResponseWriter, r *http.Request) {
err error
)
if p[1] != "" {
resp, err = cli.Get(context.Background(), p[0], clientv3.WithPrefix())
prefixKey := p[0]
if p[0] == "/" {
prefixKey = ""
}
resp, err = cli.Get(context.Background(), prefixKey, clientv3.WithPrefix())
} else {
resp, err = cli.Get(context.Background(), p[0])
}
Expand Down

0 comments on commit 02f3c76

Please sign in to comment.