mirror of
https://github.com/turbot/steampipe.git
synced 2026-05-11 00:02:37 -04:00
29 lines
645 B
Go
29 lines
645 B
Go
package controldisplay
|
|
|
|
import (
|
|
"context"
|
|
"github.com/turbot/steampipe/pkg/constants"
|
|
"github.com/turbot/steampipe/pkg/control/controlexecute"
|
|
"io"
|
|
"strings"
|
|
)
|
|
|
|
// NullFormatter is to be used when no output is expected. It always returns a `io.Reader` which
|
|
// reads an empty string
|
|
type NullFormatter struct {
|
|
FormatterBase
|
|
}
|
|
|
|
func (j *NullFormatter) Format(ctx context.Context, tree *controlexecute.ExecutionTree) (io.Reader, error) {
|
|
return strings.NewReader(""), nil
|
|
}
|
|
|
|
func (j *NullFormatter) FileExtension() string {
|
|
// will not be called
|
|
return ""
|
|
}
|
|
|
|
func (j *NullFormatter) Name() string {
|
|
return constants.OutputFormatNone
|
|
}
|