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 <wking@tremily.us>
  • Loading branch information
wking committed May 7, 2016
1 parent 759ee79 commit 5c2193f
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 5c2193f

Please sign in to comment.