From 55f7df577a06d8ddcda00481ce9f54a52f0e71ef Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Tue, 18 Jul 2017 13:16:58 +0100 Subject: [PATCH] Add json config for top level config Otherwise JSON output as metadata cannot actually be used as it has capitalised field names. Signed-off-by: Justin Cormack --- src/moby/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/moby/config.go b/src/moby/config.go index a2d87fc4c..be23975d5 100644 --- a/src/moby/config.go +++ b/src/moby/config.go @@ -19,12 +19,12 @@ import ( // Moby is the type of a Moby config file type Moby struct { - Kernel KernelConfig - Init []string - Onboot []Image - Services []Image - Trust TrustConfig - Files []File + Kernel KernelConfig `kernel:"cmdline" json:"kernel,omitempty"` + Init []string `init:"cmdline" json:"init"` + Onboot []Image `yaml:"onboot" json:"onboot"` + Services []Image `yaml:"services" json:"services"` + Trust TrustConfig `yaml:"trust" json:"trust,omitempty"` + Files []File `yaml:"files" json:"files"` } // KernelConfig is the type of the config for a kernel