mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-16 07:01:11 -05:00
20 lines
395 B
Go
20 lines
395 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package arguments
|
|
|
|
import (
|
|
"flag"
|
|
"io/ioutil"
|
|
)
|
|
|
|
// defaultFlagSet creates a FlagSet with the common settings to override
|
|
// the flag package's noisy defaults.
|
|
func defaultFlagSet(name string) *flag.FlagSet {
|
|
f := flag.NewFlagSet(name, flag.ContinueOnError)
|
|
f.SetOutput(ioutil.Discard)
|
|
f.Usage = func() {}
|
|
|
|
return f
|
|
}
|