Skip to content

Commit 3c4ad30

Browse files
committed
fix checks
1 parent 423cb0e commit 3c4ad30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"os"
1111

1212
"code.gitea.io/gitea/modules/generate"
13-
"golang.org/x/crypto/ssh"
1413

1514
"github.com/mattn/go-isatty"
1615
"github.com/urfave/cli/v2"
16+
"golang.org/x/crypto/ssh"
1717
)
1818

1919
var (
@@ -117,7 +117,7 @@ func runGenerateKeyPair(c *cli.Context) error {
117117
keytype := c.String("type")
118118
file := c.String("file")
119119
bits := c.Int("bits")
120-
// provide defaults for bits, ed25519 ignores bit length so it's ommited
120+
// provide defaults for bits, ed25519 ignores bit length so it's omitted
121121
if bits == 0 {
122122
if keytype == "rsa" {
123123
bits = 3072

modules/generate/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
"time"
1919

2020
"code.gitea.io/gitea/modules/util"
21-
"golang.org/x/crypto/ssh"
2221

2322
"github.com/golang-jwt/jwt/v5"
23+
"golang.org/x/crypto/ssh"
2424
)
2525

2626
// NewInternalToken generate a new value intended to be used by INTERNAL_TOKEN.
@@ -98,7 +98,7 @@ func NewSSHKey(keytype string, bits int) (ssh.PublicKey, *pem.Block, error) {
9898
}
9999

100100
// commonKeyGen is an abstraction over rsa, ecdsa and ed25519 generating functions
101-
func commonKeyGen(keytype string, bits int) (publicKey crypto.PublicKey, privateKey crypto.PublicKey, err error) {
101+
func commonKeyGen(keytype string, bits int) (publicKey, privateKey crypto.PublicKey, err error) {
102102
switch keytype {
103103
case "rsa":
104104
privateKey, err := rsa.GenerateKey(rand.Reader, bits)

0 commit comments

Comments
 (0)