@@ -481,7 +481,7 @@ func TestShowCommandHelp_HelpPrinter(t *testing.T) {
481481 {
482482 name : "no-command" ,
483483 template : "" ,
484- printer : func (w io.Writer , _ string , _ interface {} ) {
484+ printer : func (w io.Writer , _ string , _ any ) {
485485 fmt .Fprint (w , "yo" )
486486 },
487487 command : "" ,
@@ -517,7 +517,7 @@ func TestShowCommandHelp_HelpPrinter(t *testing.T) {
517517 defer func (old HelpPrinterFunc ) {
518518 HelpPrinter = old
519519 }(HelpPrinter )
520- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
520+ HelpPrinter = func (w io.Writer , templ string , data any ) {
521521 assert .Equal (t , tt .wantTemplate , templ , "template mismatch" )
522522 tt .printer (w , templ , data )
523523 }
@@ -947,7 +947,7 @@ func TestShowRootCommandHelp_HelpPrinter(t *testing.T) {
947947 {
948948 name : "standard-command" ,
949949 template : "" ,
950- printer : func (w io.Writer , _ string , _ interface {} ) {
950+ printer : func (w io.Writer , _ string , _ any ) {
951951 fmt .Fprint (w , "yo" )
952952 },
953953 wantTemplate : RootCommandHelpTemplate ,
@@ -956,7 +956,7 @@ func TestShowRootCommandHelp_HelpPrinter(t *testing.T) {
956956 {
957957 name : "custom-template-command" ,
958958 template : "{{doublecho .Name}}" ,
959- printer : func (w io.Writer , templ string , data interface {} ) {
959+ printer : func (w io.Writer , templ string , data any ) {
960960 // Pass a custom function to ensure it gets used
961961 fm := map [string ]any {"doublecho" : doublecho }
962962 DefaultPrintHelpCustom (w , templ , data , fm )
@@ -971,7 +971,7 @@ func TestShowRootCommandHelp_HelpPrinter(t *testing.T) {
971971 defer func (old HelpPrinterFunc ) {
972972 HelpPrinter = old
973973 }(HelpPrinter )
974- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
974+ HelpPrinter = func (w io.Writer , templ string , data any ) {
975975 assert .Equal (t , tt .wantTemplate , templ , "unexpected template" )
976976 tt .printer (w , templ , data )
977977 }
@@ -1006,7 +1006,7 @@ func TestShowRootCommandHelp_HelpPrinterCustom(t *testing.T) {
10061006 {
10071007 name : "standard-command" ,
10081008 template : "" ,
1009- printer : func (w io.Writer , _ string , _ interface {} , _ map [string ]interface {} ) {
1009+ printer : func (w io.Writer , _ string , _ any , _ map [string ]any ) {
10101010 fmt .Fprint (w , "yo" )
10111011 },
10121012 wantTemplate : RootCommandHelpTemplate ,
@@ -1015,7 +1015,7 @@ func TestShowRootCommandHelp_HelpPrinterCustom(t *testing.T) {
10151015 {
10161016 name : "custom-template-command" ,
10171017 template : "{{doublecho .Name}}" ,
1018- printer : func (w io.Writer , templ string , data interface {} , _ map [string ]interface {} ) {
1018+ printer : func (w io.Writer , templ string , data any , _ map [string ]any ) {
10191019 // Pass a custom function to ensure it gets used
10201020 fm := map [string ]any {"doublecho" : doublecho }
10211021 DefaultPrintHelpCustom (w , templ , data , fm )
@@ -1030,7 +1030,7 @@ func TestShowRootCommandHelp_HelpPrinterCustom(t *testing.T) {
10301030 defer func (old HelpPrinterCustomFunc ) {
10311031 HelpPrinterCustom = old
10321032 }(HelpPrinterCustom )
1033- HelpPrinterCustom = func (w io.Writer , templ string , data interface {} , fm map [string ]interface {} ) {
1033+ HelpPrinterCustom = func (w io.Writer , templ string , data any , fm map [string ]any ) {
10341034 assert .Nil (t , fm , "unexpected function map passed" )
10351035 assert .Equal (t , tt .wantTemplate , templ , "unexpected template" )
10361036 tt .printer (w , templ , data , fm )
@@ -1514,8 +1514,8 @@ Including newlines.
15141514And then another long line. Blah blah blah does anybody ever read these things?` ,
15151515 }
15161516
1517- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
1518- funcMap := map [string ]interface {} {
1517+ HelpPrinter = func (w io.Writer , templ string , data any ) {
1518+ funcMap := map [string ]any {
15191519 "wrapAt" : func () int {
15201520 return 30
15211521 },
@@ -1597,8 +1597,8 @@ func TestWrappedCommandHelp(t *testing.T) {
15971597 cmd .setupDefaults ([]string {"cli.test" })
15981598 cmd .setupCommandGraph ()
15991599
1600- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
1601- funcMap := map [string ]interface {} {
1600+ HelpPrinter = func (w io.Writer , templ string , data any ) {
1601+ funcMap := map [string ]any {
16021602 "wrapAt" : func () int {
16031603 return 30
16041604 },
@@ -1665,8 +1665,8 @@ func TestWrappedSubcommandHelp(t *testing.T) {
16651665 },
16661666 }
16671667
1668- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
1669- funcMap := map [string ]interface {} {
1668+ HelpPrinter = func (w io.Writer , templ string , data any ) {
1669+ funcMap := map [string ]any {
16701670 "wrapAt" : func () int {
16711671 return 30
16721672 },
@@ -1737,8 +1737,8 @@ func TestWrappedHelpSubcommand(t *testing.T) {
17371737 },
17381738 }
17391739
1740- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
1741- funcMap := map [string ]interface {} {
1740+ HelpPrinter = func (w io.Writer , templ string , data any ) {
1741+ funcMap := map [string ]any {
17421742 "wrapAt" : func () int {
17431743 return 30
17441744 },
@@ -1821,8 +1821,8 @@ func TestCategorizedHelp(t *testing.T) {
18211821 },
18221822 }
18231823
1824- HelpPrinter = func (w io.Writer , templ string , data interface {} ) {
1825- funcMap := map [string ]interface {} {
1824+ HelpPrinter = func (w io.Writer , templ string , data any ) {
1825+ funcMap := map [string ]any {
18261826 "wrapAt" : func () int {
18271827 return 30
18281828 },
0 commit comments