From 835ad784660267daa5af9d0881aab210f4dbd5f7 Mon Sep 17 00:00:00 2001 From: Walkablenormal Date: Wed, 26 Apr 2023 16:33:30 +0200 Subject: [PATCH] FIX: (Again) too many indents. --- lib/GoGitClient.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/GoGitClient.go b/lib/GoGitClient.go index 943341f2..18988a26 100644 --- a/lib/GoGitClient.go +++ b/lib/GoGitClient.go @@ -32,29 +32,29 @@ func getAuthMethod(r GitRepository) (transport.AuthMethod, error) { var sshKeyBuff = r.Repository.SSHKey.SshKey.PrivateKey if r.Repository.SSHKey.SshKey.Login == "" { - r.Repository.SSHKey.SshKey.Login = "git" + r.Repository.SSHKey.SshKey.Login = "git" } publicKey, sshErr := ssh.NewPublicKeys(r.Repository.SSHKey.SshKey.Login, []byte(sshKeyBuff), r.Repository.SSHKey.SshKey.Passphrase) if sshErr != nil { - r.Logger.Log("Unable to creating ssh auth method") - return nil, sshErr + r.Logger.Log("Unable to creating ssh auth method") + return nil, sshErr } publicKey.HostKeyCallback = ssh2.InsecureIgnoreHostKey() return publicKey, sshErr } else if r.Repository.SSHKey.Type == db.AccessKeyLoginPassword { password := &http.BasicAuth{ - Username: r.Repository.SSHKey.LoginPassword.Login, - Password: r.Repository.SSHKey.LoginPassword.Password, + Username: r.Repository.SSHKey.LoginPassword.Login, + Password: r.Repository.SSHKey.LoginPassword.Password, } return password, nil } else if r.Repository.SSHKey.Type == db.AccessKeyNone { - return nil, nil + return nil, nil } else { - return nil, errors.New("Unsupported auth method") + return nil, errors.New("Unsupported auth method") } }