mirror of
https://codeberg.org/scip/anydb.git
synced 2026-10-08 03:04:20 +02:00
update linter config, satisfy linter (#28)
This commit is contained in:
12
cmd/crud.go
12
cmd/crud.go
@@ -116,19 +116,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
|
||||
}
|
||||
|
||||
@@ -137,7 +137,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'")
|
||||
@@ -224,7 +225,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")
|
||||
|
||||
Reference in New Issue
Block a user