From dcfdb3d5d5507a88d6b8f330aab610a0cae060d5 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Thu, 14 Mar 2019 23:40:30 +0300 Subject: [PATCH] all: fix no-op append calls (#6360) Append call in form of `append(s)` has no effect, it just returns `s`. Sometimes such invocation is a sign of a programming error, so it's better to remove these. Signed-off-by: Iskander Sharipov --- builtin/credential/cert/backend.go | 4 ++-- command/ssh.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/credential/cert/backend.go b/builtin/credential/cert/backend.go index ab4b2a30dc..8b4c808e25 100644 --- a/builtin/credential/cert/backend.go +++ b/builtin/credential/cert/backend.go @@ -26,13 +26,13 @@ func Backend() *backend { "login", }, }, - Paths: append([]*framework.Path{ + Paths: []*framework.Path{ pathConfig(&b), pathLogin(&b), pathListCerts(&b), pathCerts(&b), pathCRLs(&b), - }), + }, AuthRenew: b.pathLoginRenew, Invalidate: b.invalidate, BackendType: logical.TypeCredential, diff --git a/command/ssh.go b/command/ssh.go index 00af94ea7f..73481c10df 100644 --- a/command/ssh.go +++ b/command/ssh.go @@ -467,11 +467,11 @@ func (c *SSHCommand) handleTypeCA(username, ip, port string, sshArgs []string) i return 2 } - args := append([]string{ + args := []string{ "-i", c.flagPrivateKeyPath, "-i", signedPublicKeyPath, "-o StrictHostKeyChecking=" + strictHostKeyChecking, - }) + } if userKnownHostsFile != "" { args = append(args,