Fix linting

This commit is contained in:
joshcarp 2022-03-16 17:50:04 +11:00
parent d969ce0e38
commit 645be2c447

View file

@ -2061,7 +2061,7 @@ func TestFParseErrWhitelistSiblingCommand(t *testing.T) {
func TestSetContext(t *testing.T) { func TestSetContext(t *testing.T) {
type key struct{} type key struct{}
val := "val" val := "foobar"
root := &Command{ root := &Command{
Use: "root", Use: "root",
Run: func(cmd *Command, args []string) { Run: func(cmd *Command, args []string) {
@ -2076,7 +2076,7 @@ func TestSetContext(t *testing.T) {
}, },
} }
ctx := context.WithValue(context.Background(), key{}, val) ctx := context.WithValue(context.Background(), key{}, val)
root.SetContext(ctx) root.SetContext(ctx)
err := root.Execute() err := root.Execute()
if err != nil { if err != nil {
@ -2086,7 +2086,7 @@ func TestSetContext(t *testing.T) {
func TestSetContextPreRun(t *testing.T) { func TestSetContextPreRun(t *testing.T) {
type key struct{} type key struct{}
val := "bar" val := "barr"
root := &Command{ root := &Command{
Use: "root", Use: "root",
PreRun: func(cmd *Command, args []string) { PreRun: func(cmd *Command, args []string) {
@ -2112,7 +2112,7 @@ func TestSetContextPreRun(t *testing.T) {
func TestSetContextPreRunOverwrite(t *testing.T) { func TestSetContextPreRunOverwrite(t *testing.T) {
type key struct{} type key struct{}
val := "bar" val := "blah"
root := &Command{ root := &Command{
Use: "root", Use: "root",
Run: func(cmd *Command, args []string) { Run: func(cmd *Command, args []string) {
@ -2133,7 +2133,7 @@ func TestSetContextPreRunOverwrite(t *testing.T) {
func TestSetContextPersistentPreRun(t *testing.T) { func TestSetContextPersistentPreRun(t *testing.T) {
type key struct{} type key struct{}
val := "bar" val := "barbar"
root := &Command{ root := &Command{
Use: "root", Use: "root",
PersistentPreRun: func(cmd *Command, args []string) { PersistentPreRun: func(cmd *Command, args []string) {