mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
plugin: cleanup code based on staticcheck warnings (#3302)
TrimPrefix re-assign to former variable Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
This commit is contained in:
committed by
Miek Gieben
parent
47719756fe
commit
eb59e79207
@@ -83,7 +83,7 @@ func (e *Etcd) Records(ctx context.Context, state request.Request, exact bool) (
|
||||
func (e *Etcd) get(ctx context.Context, path string, recursive bool) (*etcdcv3.GetResponse, error) {
|
||||
ctx, cancel := context.WithTimeout(ctx, etcdTimeout)
|
||||
defer cancel()
|
||||
if recursive == true {
|
||||
if recursive {
|
||||
if !strings.HasSuffix(path, "/") {
|
||||
path = path + "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user