github.com/opentofu/opentofu@v1.7.1/internal/command/arguments/default.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package arguments 7 8 import ( 9 "flag" 10 "io" 11 ) 12 13 // defaultFlagSet creates a FlagSet with the common settings to override 14 // the flag package's noisy defaults. 15 func defaultFlagSet(name string) *flag.FlagSet { 16 f := flag.NewFlagSet(name, flag.ContinueOnError) 17 f.SetOutput(io.Discard) 18 f.Usage = func() {} 19 20 return f 21 }