mirror of https://github.com/docker/cli.git
cli/command/formatter: export JSONFormat const
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5acb64944f
commit
1aaa179d9d
|
@ -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, " ")
|
||||
|
|
Loading…
Reference in New Issue