From dd0045e36f3635bdcc863922e89cb3b4f80bde6d Mon Sep 17 00:00:00 2001 From: John Guo Date: Tue, 30 Nov 2021 16:43:42 +0800 Subject: [PATCH] improve package gcmd --- os/gcmd/gcmd_command_object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/gcmd/gcmd_command_object.go b/os/gcmd/gcmd_command_object.go index 4957d6cd2..2449a73f0 100644 --- a/os/gcmd/gcmd_command_object.go +++ b/os/gcmd/gcmd_command_object.go @@ -228,7 +228,7 @@ func newCommandFromMethod(object interface{}, method reflect.Value) (command Com // Parameters validation. if err = gvalid.New().Bail().Data(inputObject.Interface()).Assoc(data).Run(ctx); err != nil { - err = gerror.Current(err) + err = gerror.Wrap(gerror.Current(err), `validation failed for command options`) return } inputValues = append(inputValues, inputObject)