mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-20 10:19:27 -05:00
22 lines
463 B
Go
22 lines
463 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package arguments
|
|
|
|
import (
|
|
"flag"
|
|
"io"
|
|
)
|
|
|
|
// 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(io.Discard)
|
|
f.Usage = func() {}
|
|
|
|
return f
|
|
}
|