Skip to content

Commit 999860c

Browse files
committed
fix error style
1 parent 0a35694 commit 999860c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

routers/api/v1/misc/signing.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package misc
55

66
import (
7+
"errors"
78
"fmt"
89

910
asymkey_service "code.gitea.io/gitea/services/asymkey"
@@ -56,7 +57,7 @@ func SigningKey(ctx *context.APIContext) {
5657
return
5758
}
5859
if format == "ssh" {
59-
ctx.APIErrorNotFound(fmt.Errorf("SSH keys are used for signing, not GPG"))
60+
ctx.APIErrorNotFound(errors.New("SSH keys are used for signing, not GPG"))
6061
return
6162
}
6263
_, err = ctx.Write([]byte(content))
@@ -111,7 +112,7 @@ func SigningKeySSH(ctx *context.APIContext) {
111112
return
112113
}
113114
if format != "ssh" {
114-
ctx.APIErrorNotFound(fmt.Errorf("GPG keys are used for signing, not SSH"))
115+
ctx.APIErrorNotFound(errors.New("GPG keys are used for signing, not SSH"))
115116
return
116117
}
117118
_, err = ctx.Write([]byte(content))

0 commit comments

Comments
 (0)