From 5c2193f3576ed8756ff3755259c9e30df3ab3a72 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 May 2016 23:58:09 -0700 Subject: [PATCH] specs-go/config: Make Linux and Solaris omitempty Both fields are optional, so you could conceivably have neither. However, in most cases folks will populate the one corresponding to their platform. The one that *doesn't* match their platform must not show up, in order to avoid violating the: This should only be set if **`platform.os`** is ... phrasing. Signed-off-by: W. Trevor King --- specs-go/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs-go/config.go b/specs-go/config.go index fda11eec5..e90acf744 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -24,9 +24,9 @@ type Spec struct { Annotations map[string]string `json:"annotations,omitempty"` // Linux is platform specific configuration for Linux based containers. - Linux Linux `json:"linux" platform:"linux"` + Linux Linux `json:"linux" platform:"linux,omitempty"` // Solaris is platform specific configuration for Solaris containers. - Solaris Solaris `json:"solaris" platform:"solaris"` + Solaris Solaris `json:"solaris" platform:"solaris,omitempty"` } // Process contains information to start a specific application inside the container.