diff --git a/main.go b/main.go index a9dbe3f..49abc4d 100644 --- a/main.go +++ b/main.go @@ -44,7 +44,7 @@ func main() { Value: []string{"11"}, }, }, - Action: func(ctx context.Context, c *cli.Command) error { + Action: func(_ context.Context, c *cli.Command) error { if c.NArg() != 1 { return fmt.Errorf("requires 1 arg, the partition label") } @@ -73,7 +73,7 @@ func main() { Usage: "Use TPM to unlock the partition", }, }, - Action: func(ctx context.Context, c *cli.Command) error { + Action: func(_ context.Context, c *cli.Command) error { return lib.UnlockAllWithLogger(c.Bool("tpm"), log) }, }, @@ -83,7 +83,7 @@ func main() { Usage: "Prints the version", Description: "Prints the version", ArgsUsage: "kcrypt version", - Action: func(ctx context.Context, c *cli.Command) error { + Action: func(_ context.Context, c *cli.Command) error { log.Logger.Info().Str("commit", GitCommit).Str("goversion", runtime.Version()).Str("version", Version).Msg("Kcrypt") return nil }, diff --git a/pkg/lib/unlock.go b/pkg/lib/unlock.go index 6a68c98..7762ed0 100644 --- a/pkg/lib/unlock.go +++ b/pkg/lib/unlock.go @@ -73,7 +73,7 @@ func UnlockAllWithLogger(tpm bool, log types.KairosLogger) error { func UnlockDisk(b *block.Partition) error { pass, err := GetPassword(b) if err != nil { - return fmt.Errorf("error retriving password remotely: %w", err) + return fmt.Errorf("error retrieving password remotely: %w", err) } return LuksUnlock(filepath.Join("/dev", b.Name), b.Name, pass)