lockbox

password manager
Log | Files | Refs | README | LICENSE

commit a23102dede26293b2fd99bfeec565afe1911444c
parent 720df287781fe3fd5abf21e34d448bbc1e946e70
Author: Sean Enck <sean@ttypty.com>
Date:   Sat, 15 Oct 2022 10:31:01 -0400

wrappedError can also be removed

Diffstat:
Mcmd/main.go | 11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/cmd/main.go b/cmd/main.go @@ -40,9 +40,6 @@ var ( type ( callbackFunction func([]string) error - wrappedError struct { - message string - } ) func printSubCommand(parent, name, args, desc string) { @@ -135,12 +132,8 @@ func processInfoCommands(command string, args []string) (bool, error) { return true, nil } -func wrapped(message string, err error) wrappedError { - return wrappedError{message: fmt.Sprintf("%s (%v)", message, err)} -} - -func (w wrappedError) Error() string { - return w.message +func wrapped(message string, err error) error { + return fmt.Errorf("%s (%v)", message, err) } func run() error {