Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jan 15, 2024
1 parent 29f3b93 commit f6fc1f1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions moar.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,12 @@ func printCommandline(output io.Writer) {
fmt.Fprintln(output)
}

func printUsage(flagSet *flag.FlagSet, withCommandline bool, colors twin.ColorType) {
func printUsage(flagSet *flag.FlagSet, colors twin.ColorType) {
// This controls where PrintDefaults() prints, see below
flagSet.SetOutput(os.Stdout)

// FIXME: Log if any printouts fail?

if withCommandline {
printCommandline(os.Stdout)
}

fmt.Println("Usage:")
fmt.Println(" moar [options] <file>")
fmt.Println(" ... | moar")
Expand Down Expand Up @@ -482,7 +478,7 @@ func main() {
err = flagSet.Parse(remainingArgs)
if err != nil {
if err == flag.ErrHelp {
printUsage(flagSet, false, *terminalColorsCount)
printUsage(flagSet, *terminalColorsCount)
return
}

Expand Down

0 comments on commit f6fc1f1

Please sign in to comment.