Skip to content

Commit

Permalink
specs-go/config: Make Linux and Solaris omitempty
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wking authored and Ma Shimiao committed Aug 18, 2016
1 parent 2f09b88 commit 75809a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 75809a3

Please sign in to comment.