@@ -16,7 +16,7 @@ func (RootCmd) errorExample() *serpent.Command {
16
16
errorCmd := func (use string , err error ) * serpent.Command {
17
17
return & serpent.Command {
18
18
Use : use ,
19
- Handler : func (inv * serpent.Invocation ) error {
19
+ Handler : func (_ * serpent.Invocation ) error {
20
20
return err
21
21
},
22
22
}
@@ -57,7 +57,7 @@ func (RootCmd) errorExample() *serpent.Command {
57
57
Long : "This command is pretty pointless, but without it testing errors is" +
58
58
"difficult to visually inspect. Error message formatting is inherently" +
59
59
"visual, so we need a way to quickly see what they look like." ,
60
- Handler : func (inv * serpent.Invocation ) error {
60
+ Handler : func (_ * serpent.Invocation ) error {
61
61
return inv .Command .HelpHandler (inv )
62
62
},
63
63
Children : []* serpent.Command {
@@ -70,7 +70,7 @@ func (RootCmd) errorExample() *serpent.Command {
70
70
// A multi-error
71
71
{
72
72
Use : "multi-error" ,
73
- Handler : func (inv * serpent.Invocation ) error {
73
+ Handler : func (_ * serpent.Invocation ) error {
74
74
return xerrors .Errorf ("wrapped: %w" , errors .Join (
75
75
xerrors .Errorf ("first error: %w" , errorWithStackTrace ()),
76
76
xerrors .Errorf ("second error: %w" , errorWithStackTrace ()),
@@ -81,7 +81,7 @@ func (RootCmd) errorExample() *serpent.Command {
81
81
{
82
82
Use : "multi-multi-error" ,
83
83
Short : "This is a multi error inside a multi error" ,
84
- Handler : func (inv * serpent.Invocation ) error {
84
+ Handler : func (_ * serpent.Invocation ) error {
85
85
return errors .Join (
86
86
xerrors .Errorf ("parent error: %w" , errorWithStackTrace ()),
87
87
errors .Join (
@@ -100,7 +100,7 @@ func (RootCmd) errorExample() *serpent.Command {
100
100
Required : true ,
101
101
Flag : "magic-word" ,
102
102
Default : "" ,
103
- Value : serpent .Validate (& magicWord , func (value * serpent.String ) error {
103
+ Value : serpent .Validate (& magicWord , func (_ * serpent.String ) error {
104
104
return xerrors .Errorf ("magic word is incorrect" )
105
105
}),
106
106
},
0 commit comments