Skip to content

Commit d182f82

Browse files
committed
Fix variable naming in NewConfig function: rename cfgSSH to sshCfg for consistency
1 parent cc36bd1 commit d182f82

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/ssh/ssh.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func NewConfig(cfg *config.Config) (*ServerConfig, error) {
2323
return nil, fmt.Errorf("failed to load host key: %v", err)
2424
}
2525

26-
cfgSSH := &ServerConfig{
26+
sshCfg := &ServerConfig{
2727
PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
2828
if expected, ok := users[c.User()]; ok && expected == string(pass) {
2929
return nil, nil
@@ -36,8 +36,8 @@ func NewConfig(cfg *config.Config) (*ServerConfig, error) {
3636
ServerVersion: "SSH-2.0-ssh-ify",
3737
}
3838

39-
cfgSSH.AddHostKey(private)
40-
return cfgSSH, nil
39+
sshCfg.AddHostKey(private)
40+
return sshCfg, nil
4141
}
4242

4343
func HandleConnection(conn net.Conn, config *ServerConfig) {

0 commit comments

Comments
 (0)