mirror of
https://github.com/turbot/steampipe.git
synced 2026-02-16 07:00:18 -05:00
- JSON output format has changed to move the rows to under a `rows` property, with timing information under the `metadata` property - Update timing display to show rows returned and rows fetched, as well as adding verbose mode which lists all scans - Use enums for output mode and timing mode - timing is now either `on`, `off` or `verbose` - Bugfix: ensure error is returned from ExecuteSystemClientCall. Closes #4246
28 lines
701 B
Go
28 lines
701 B
Go
package display
|
|
|
|
import (
|
|
"github.com/turbot/steampipe/pkg/cmdconfig"
|
|
"github.com/turbot/steampipe/pkg/constants"
|
|
)
|
|
|
|
type displayConfiguration struct {
|
|
timing string
|
|
}
|
|
|
|
// newDisplayConfiguration creates a default configuration with timing set to
|
|
// true if both --timing is not 'off' and --output is table
|
|
func newDisplayConfiguration() *displayConfiguration {
|
|
return &displayConfiguration{
|
|
timing: cmdconfig.Viper().GetString(constants.ArgTiming),
|
|
}
|
|
}
|
|
|
|
type DisplayOption = func(config *displayConfiguration)
|
|
|
|
// WithTimingDisabled forcefully disables display of timing data
|
|
func WithTimingDisabled() DisplayOption {
|
|
return func(o *displayConfiguration) {
|
|
o.timing = constants.ArgOff
|
|
}
|
|
}
|