Skip to content

Commit

Permalink
Fix flags again after Fiber update changed them
Browse files Browse the repository at this point in the history
  • Loading branch information
doingodswork committed Jul 4, 2020
1 parent 6e64c51 commit 3a6dc46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flags.go
Expand Up @@ -25,13 +25,13 @@ func (s *stringValue) Get() interface{} { return string(*s) }
func (s *stringValue) String() string { return string(*s) }

// usage prints the usage of the flags an SDK user sets.
// It skips printing Fiber's `-prefork` and `-child`, that it defines as of Fiber v1.12.0.
// It skips printing Fiber's `-prefork` and `-prefork-child`, that it defines as of Fiber v1.12.4.
// This code is based on the stdlib with the only change to skip those two flags.
func usage() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
flag.CommandLine.VisitAll(func(f *flag.Flag) {
// Skip printing usage info for Fiber's flags
if f.Name == "prefork" || f.Name == "child" {
if f.Name == "prefork" || f.Name == "prefork-child" {
return
}

Expand Down

0 comments on commit 3a6dc46

Please sign in to comment.