diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2016-02-23 15:39:05 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2016-02-23 15:39:05 +0100 |
commit | 2f27ee2232ca23404baf31443a3cf661d4445232 (patch) | |
tree | 47ef17da93d86e8db5fa8081aaa603b277db56fd /models/ssh_key.go | |
parent | dab74f21b7b7f9755a8056d17adbd74c185c4199 (diff) | |
download | gitea-2f27ee2232ca23404baf31443a3cf661d4445232.tar.gz gitea-2f27ee2232ca23404baf31443a3cf661d4445232.zip |
variable should not use ALL_CAPS
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r-- | models/ssh_key.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go index 0e5226076b..c22b931c88 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -36,8 +36,8 @@ const ( ) var ( - sshOpLocker = sync.Mutex{} - SSH_UNKNOWN_KEY_TYPE = fmt.Errorf("unknown key type") + sshOpLocker = sync.Mutex{} + SSHUnknownKeyType = fmt.Errorf("unknown key type") ) type KeyType int @@ -186,7 +186,7 @@ func SSHKeyGenParsePublicKey(key string) (string, int, error) { return "", 0, fmt.Errorf("public key check failed with error '%s': %s", err, stderr) } if strings.HasSuffix(stdout, "is not a public key file.") { - return "", 0, SSH_UNKNOWN_KEY_TYPE + return "", 0, SSHUnknownKeyType } fields := strings.Split(stdout, " ") if len(fields) < 4 { @@ -216,7 +216,7 @@ func SSHNativeParsePublicKey(keyLine string) (string, int, error) { pkey, err := ssh.ParsePublicKey(raw) if err != nil { if strings.HasPrefix(err.Error(), "ssh: unknown key algorithm") { - return "", 0, SSH_UNKNOWN_KEY_TYPE + return "", 0, SSHUnknownKeyType } return "", 0, err } |