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 <wking@tremily.us>
This commit is contained in:
W. Trevor King 2016-05-06 23:58:09 -07:00
parent 759ee79c85
commit 5c2193f357
1 changed files with 2 additions and 2 deletions

View File

@ -24,9 +24,9 @@ type Spec struct {
Annotations map[string]string `json:"annotations,omitempty"` Annotations map[string]string `json:"annotations,omitempty"`
// Linux is platform specific configuration for Linux based containers. // 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 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. // Process contains information to start a specific application inside the container.