diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-02 21:14:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:14:27 +0800 |
commit | 614382fec0ba05149785539ab93560d4d42c194d (patch) | |
tree | 50037ddd412606cfadb278a9c9ea7c4a1eb3d4cc /internal/db/errors/user.go | |
parent | 9df10cb8cc84fbeba9eb603c458078f132a6c201 (diff) |
refactor(db): migrate methods off `user.go` (#7329)
Diffstat (limited to 'internal/db/errors/user.go')
-rw-r--r-- | internal/db/errors/user.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/internal/db/errors/user.go b/internal/db/errors/user.go deleted file mode 100644 index 09572af9..00000000 --- a/internal/db/errors/user.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package errors - -import ( - "fmt" -) - -type UserNotKeyOwner struct { - KeyID int64 -} - -func IsUserNotKeyOwner(err error) bool { - _, ok := err.(UserNotKeyOwner) - return ok -} - -func (err UserNotKeyOwner) Error() string { - return fmt.Sprintf("user is not the owner of public key [key_id: %d]", err.KeyID) -} |