github.com/graywolf-at-work-2/terraform-vendor@v1.4.5/internal/command/arguments/default.go (about)

     1  package arguments
     2  
     3  import (
     4  	"flag"
     5  	"io/ioutil"
     6  )
     7  
     8  // defaultFlagSet creates a FlagSet with the common settings to override
     9  // the flag package's noisy defaults.
    10  func defaultFlagSet(name string) *flag.FlagSet {
    11  	f := flag.NewFlagSet(name, flag.ContinueOnError)
    12  	f.SetOutput(ioutil.Discard)
    13  	f.Usage = func() {}
    14  
    15  	return f
    16  }