diff options
Diffstat (limited to 'lib/ssh')
| -rw-r--r-- | lib/ssh/client.go | 4 | ||||
| -rw-r--r-- | lib/ssh/config.go | 3 | ||||
| -rw-r--r-- | lib/ssh/config_parser_test.go | 2 | ||||
| -rw-r--r-- | lib/ssh/ssh_test.go | 1 |
4 files changed, 3 insertions, 7 deletions
diff --git a/lib/ssh/client.go b/lib/ssh/client.go index 0e360e62..d3ae9af6 100644 --- a/lib/ssh/client.go +++ b/lib/ssh/client.go @@ -36,7 +36,7 @@ func NewClient(cfg *ConfigSection) (cl *Client, err error) { Auth: []ssh.AuthMethod{ ssh.PublicKeys(cfg.signers...), }, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec + HostKeyCallback: ssh.InsecureIgnoreHostKey(), } cl = &Client{ @@ -101,7 +101,6 @@ func (cl *Client) Get(remote, local string) (err error) { remote = fmt.Sprintf("%s@%s:%s", cl.cfg.User, cl.cfg.Hostname, remote) - //nolint: gosec cmd := exec.Command("scp", "-r", "-i", cl.cfg.privateKeyFile, "-P", cl.cfg.stringPort, remote, local) @@ -135,7 +134,6 @@ func (cl *Client) Put(local, remote string) (err error) { remote = fmt.Sprintf("%s@%s:%s", cl.cfg.User, cl.cfg.Hostname, remote) - //nolint: gosec cmd := exec.Command("scp", "-r", "-i", cl.cfg.privateKeyFile, "-P", cl.cfg.stringPort, local, remote) diff --git a/lib/ssh/config.go b/lib/ssh/config.go index 9ea9a1c2..f8b83561 100644 --- a/lib/ssh/config.go +++ b/lib/ssh/config.go @@ -46,7 +46,7 @@ const ( ) //TODO: list of keys that are not implemented. -//nolint:varcheck,deadcode +//nolint: deadcode,varcheck const ( keyCiphers = "ciphers" keyControlMaster = "controlmaster" @@ -129,7 +129,6 @@ type Config struct { // // NewConfig load SSH configuration from file. // -//nolint: gocyclo func NewConfig(file string) (cfg *Config, err error) { if len(file) == 0 { return nil, nil diff --git a/lib/ssh/config_parser_test.go b/lib/ssh/config_parser_test.go index 27a46741..7e564f6e 100644 --- a/lib/ssh/config_parser_test.go +++ b/lib/ssh/config_parser_test.go @@ -18,7 +18,7 @@ func TestIsIncludeDirective(t *testing.T) { }{{ line: "", }, { - line: "includ", //nolint: misspell + line: "includ", }, { line: "INCLUDE", }, { diff --git a/lib/ssh/ssh_test.go b/lib/ssh/ssh_test.go index 1f84db0b..33ddfe66 100644 --- a/lib/ssh/ssh_test.go +++ b/lib/ssh/ssh_test.go @@ -12,7 +12,6 @@ import ( "github.com/shuLhan/share/lib/test" ) -//nolint: gochecknoglobals var ( testDefaultSection = newConfigSection() testParser *configParser |
