mirror of
https://github.com/hashicorp/terraform.git
synced 2026-04-21 06:08:16 -04:00
* WIP * Reuse plan command for query CLI * Basic CLI output * Only fail a list request on error * poc: store query results in separate field * WIP: odd mixture between JSONs * Fix list references * Separate JSON rendering The structured JSON now only logs a status on which list query is currently running. The new jsonlist package can marshal the query fields of a plan. * Remove matcher * Store results in an extra struct * Structured list result logging * Move list result output into hooks * Add help text and additional flag * Disable query runs with the cloud backend for now * Review feedback
19 lines
385 B
Go
19 lines
385 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
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
|
|
}
|