satisfy linter

This commit is contained in:
2026-08-31 22:02:07 +02:00
parent cafc65aea7
commit 49eb1033ef
23 changed files with 327 additions and 220 deletions

View File

@@ -112,19 +112,19 @@ func Get(conf *cfg.Config) *cobra.Command {
return err
}
if entry.Encrypted {
if entry.GetEncrypted() {
pass, err := getPassword()
if err != nil {
return err
}
clear, err := app.Decrypt(pass, []byte(entry.Value))
clear, err := app.Decrypt(pass, []byte(entry.GetValue()))
if err != nil {
return err
}
entry.Value = string(clear)
entry.Size = uint64(len(entry.Value))
entry.Size = uint64(len(entry.GetValue()))
entry.Encrypted = false
}
@@ -133,7 +133,8 @@ func Get(conf *cfg.Config) *cobra.Command {
}
cmd.PersistentFlags().StringVarP(&attr.File, "output", "o", "", "output value to file (ignores -m)")
cmd.PersistentFlags().StringVarP(&conf.Mode, "mode", "m", "", "output format (simple|wide|json|template) (default 'simple')")
cmd.PersistentFlags().StringVarP(&conf.Mode, "mode", "m", "",
"output format (simple|wide|json|template) (default 'simple')")
cmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "n", false, "omit headers in tables")
cmd.PersistentFlags().BoolVarP(&conf.NoHumanize, "no-human", "N", false, "do not translate to human readable values")
cmd.PersistentFlags().StringVarP(&conf.Template, "template", "T", "", "go template for '-m template'")
@@ -216,7 +217,8 @@ func List(conf *cfg.Config) *cobra.Command {
},
}
cmd.PersistentFlags().StringVarP(&conf.Mode, "mode", "m", "", "output format (table|wide|json|template), wide is a verbose table. (default 'table')")
cmd.PersistentFlags().StringVarP(&conf.Mode, "mode", "m", "",
"output format (table|wide|json|template), wide is a verbose table. (default 'table')")
cmd.PersistentFlags().StringVarP(&conf.Template, "template", "T", "", "go template for '-m template'")
cmd.PersistentFlags().BoolVarP(&wide, "wide-output", "l", false, "output mode: wide")
cmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "n", false, "omit headers in tables")