Skip to content

Commit

Permalink
pkg/imagefilter/formatter.go: add GetSupportedOutputFormats
Browse files Browse the repository at this point in the history
Provides an interface so this can be printed on help output or similar.
  • Loading branch information
schuellerf committed Jan 24, 2025
1 parent 9e82cb1 commit 19a040d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/imagefilter/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ const (
OutputFormatText OutputFormat = "text"
OutputFormatJSON OutputFormat = "json"
OutputFormatTextShell OutputFormat = "shell"
<<<<<<< HEAD
OutputFormatTextShort OutputFormat = "short"
=======
>>>>>>> 964154d40 (pkg/imagefilter/formatter: add `shell` output)
)

func GetSupportedOutputFormats() []string {
return []string{
string(OutputFormatText),
string(OutputFormatJSON),
string(OutputFormatTextShell),
string(OutputFormatTextShort),
}
}

// ResultFormatter will format the given result list to the given io.Writer
type ResultsFormatter interface {
Output(io.Writer, []Result) error
Expand Down

0 comments on commit 19a040d

Please sign in to comment.