Using os.Args is not necessary
This commit is contained in:
		@@ -2,7 +2,6 @@ package lumecmd
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"os"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	lifx "git.kill0.net/chill9/lume"
 | 
						lifx "git.kill0.net/chill9/lume"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -23,7 +22,7 @@ func SetColorCmd(args CmdArgs) (int, error) {
 | 
				
			|||||||
	name := args.Flags.String("name")
 | 
						name := args.Flags.String("name")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (hueFlag == "" || saturationFlag == "") && rgbFlag == "" && name == "" {
 | 
						if (hueFlag == "" || saturationFlag == "") && rgbFlag == "" && name == "" {
 | 
				
			||||||
		printCmdHelp(os.Args[1])
 | 
							printCmdHelp(args.Name)
 | 
				
			||||||
		return ExitFailure, nil
 | 
							return ExitFailure, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user