diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-22 00:50:47 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-22 00:50:47 +0800 |
commit | 17da2fd2e30e85909394bc58069ecab14d8d8577 (patch) | |
tree | d80e786818d20aed12b7a84f6a9961468a7f70ec /models/publickey.go | |
parent | efdaf6ee1536f043d9e242dc16a096c99ec1bfda (diff) | |
parent | f219ddcf4ef13b9d5de129da4eb2b56dbc899d61 (diff) |
merged
Diffstat (limited to 'models/publickey.go')
-rw-r--r-- | models/publickey.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/publickey.go b/models/publickey.go index 092436d5..c69bca68 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -27,8 +27,12 @@ const ( ) var ( - sshOpLocker = sync.Mutex{} + ErrKeyAlreadyExist = errors.New("Public key already exist") +) +var sshOpLocker = sync.Mutex{} + +var ( sshPath string appPath string ) @@ -79,10 +83,6 @@ type PublicKey struct { Updated time.Time `xorm:"updated"` } -var ( - ErrKeyAlreadyExist = errors.New("Public key already exist") -) - // GenAuthorizedKey returns formatted public key string. func GenAuthorizedKey(keyId int64, key string) string { return fmt.Sprintf(TPL_PUBLICK_KEY+"\n", appPath, keyId, key) |