mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-06-04 21:19:56 +00:00
Lint
Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
parent
3d9999b170
commit
faf0b097ea
6
main.go
6
main.go
@ -44,7 +44,7 @@ func main() {
|
|||||||
Value: []string{"11"},
|
Value: []string{"11"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(ctx context.Context, c *cli.Command) error {
|
Action: func(_ context.Context, c *cli.Command) error {
|
||||||
if c.NArg() != 1 {
|
if c.NArg() != 1 {
|
||||||
return fmt.Errorf("requires 1 arg, the partition label")
|
return fmt.Errorf("requires 1 arg, the partition label")
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ func main() {
|
|||||||
Usage: "Use TPM to unlock the partition",
|
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)
|
return lib.UnlockAllWithLogger(c.Bool("tpm"), log)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -83,7 +83,7 @@ func main() {
|
|||||||
Usage: "Prints the version",
|
Usage: "Prints the version",
|
||||||
Description: "Prints the version",
|
Description: "Prints the version",
|
||||||
ArgsUsage: "kcrypt 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")
|
log.Logger.Info().Str("commit", GitCommit).Str("goversion", runtime.Version()).Str("version", Version).Msg("Kcrypt")
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
@ -73,7 +73,7 @@ func UnlockAllWithLogger(tpm bool, log types.KairosLogger) error {
|
|||||||
func UnlockDisk(b *block.Partition) error {
|
func UnlockDisk(b *block.Partition) error {
|
||||||
pass, err := GetPassword(b)
|
pass, err := GetPassword(b)
|
||||||
if err != nil {
|
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)
|
return LuksUnlock(filepath.Join("/dev", b.Name), b.Name, pass)
|
||||||
|
Loading…
Reference in New Issue
Block a user