From 1aaa179d9d1cd2d4c2ce5175a5aa0edfdc0139eb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 10 Apr 2023 14:26:07 +0200 Subject: [PATCH] cli/command/formatter: export JSONFormat const Signed-off-by: Sebastiaan van Stijn --- cli/command/formatter/formatter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/formatter/formatter.go b/cli/command/formatter/formatter.go index 715e9ea62b..55c5ea6e02 100644 --- a/cli/command/formatter/formatter.go +++ b/cli/command/formatter/formatter.go @@ -19,7 +19,7 @@ const ( JSONFormatKey = "json" DefaultQuietFormat = "{{.ID}}" - jsonFormat = "{{json .}}" + JSONFormat = "{{json .}}" ) // Format is the format string rendered using the Context @@ -62,7 +62,7 @@ func (c *Context) preFormat() { case c.Format.IsTable(): c.finalFormat = c.finalFormat[len(TableFormatKey):] case c.Format.IsJSON(): - c.finalFormat = jsonFormat + c.finalFormat = JSONFormat } c.finalFormat = strings.Trim(c.finalFormat, " ")