lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 0f3c9ca0edd6796095bd39869416b53fa71f051c
parent 9f4b7017b82a2c1ebfff1fb6bd53be356f9eea51
Author: Sean Enck <sean@ttypty.com>
Date:   Sat, 16 Jul 2022 16:53:54 -0400

this can be simplified

Diffstat:
Minternal/subcommands/display.go | 14++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/internal/subcommands/display.go b/internal/subcommands/display.go @@ -64,14 +64,12 @@ func DisplayCallback(args DisplayOptions) ([]dump.ExportEntity, error) { return nil, err } entity := dump.ExportEntity{Value: strings.TrimSpace(string(decrypt))} - if args.Show { - if isGlob { - fileName := args.Store.CleanPath(entry) - if args.Dump { - entity.Path = fileName - } else { - entity.Path = fmt.Sprintf("%s%s:%s", coloring.Start, fileName, coloring.End) - } + if args.Show && isGlob { + fileName := args.Store.CleanPath(entry) + if args.Dump { + entity.Path = fileName + } else { + entity.Path = fmt.Sprintf("%s%s:%s", coloring.Start, fileName, coloring.End) } } dumpData = append(dumpData, entity)