chore: typos
All checks were successful
tests / golangci-lint (push) Successful in 27s
tests / go test (push) Successful in 33s

This commit is contained in:
Jared Allard 2025-02-22 22:19:48 -08:00
parent 886e8aa11e
commit 7993a6a054
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
5 changed files with 8 additions and 7 deletions

1
go.mod
View file

@ -4,7 +4,6 @@ go 1.23
require (
entgo.io/ent v0.14.2
github.com/davecgh/go-spew v1.1.1
github.com/ncruces/go-sqlite3 v0.23.1
github.com/spf13/cobra v1.9.1
google.golang.org/grpc v1.70.0

View file

@ -31,7 +31,7 @@ import (
// New creates a new connection to the DB.
func New(ctx context.Context) (*ent.Client, error) {
client, err := ent.Open(dialect.SQLite, "file:data/klefkictl.db")
client, err := ent.Open(dialect.SQLite, "file:data/klefki.db")
if err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)
}

View file

@ -47,7 +47,7 @@ type Machine struct {
// when initialized through [MachineFromDB] or [Machine].
PublicKey ed25519.PublicKey
// PrivateKye is the private key for this machine. This is normally
// PrivateKey is the private key for this machine. This is normally
// not set instead only when [NewMachine] is called.
PrivateKey ed25519.PrivateKey
}
@ -97,12 +97,12 @@ func (m *Machine) EncodePrivateKey() (string, error) {
// EncodePublicKey returns a X509 PEM encoded public key for the
// ed25519 public key of this machine.
func (m *Machine) EncodePublicKey() (string, error) {
privKey, err := x509.MarshalPKIXPublicKey(m.PublicKey)
pubKey, err := x509.MarshalPKIXPublicKey(m.PublicKey)
if err != nil {
return "", fmt.Errorf("failed to marshal public key: %w", err)
}
encoded := pem.EncodeToMemory(&pem.Block{Type: "ED25519 PUBLIC KEY", Bytes: privKey})
encoded := pem.EncodeToMemory(&pem.Block{Type: "ED25519 PUBLIC KEY", Bytes: pubKey})
return string(encoded), nil
}

View file

@ -7,11 +7,12 @@
package v1
import (
reflect "reflect"
unsafe "unsafe"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/gofeaturespb"
reflect "reflect"
unsafe "unsafe"
)
const (

View file

@ -8,6 +8,7 @@ package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"