Skip to content

Commit 5c2193f

Browse files
committed
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 <[email protected]>
1 parent 759ee79 commit 5c2193f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

specs-go/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ type Spec struct {
2424
Annotations map[string]string `json:"annotations,omitempty"`
2525

2626
// Linux is platform specific configuration for Linux based containers.
27-
Linux Linux `json:"linux" platform:"linux"`
27+
Linux Linux `json:"linux" platform:"linux,omitempty"`
2828
// Solaris is platform specific configuration for Solaris containers.
29-
Solaris Solaris `json:"solaris" platform:"solaris"`
29+
Solaris Solaris `json:"solaris" platform:"solaris,omitempty"`
3030
}
3131

3232
// Process contains information to start a specific application inside the container.

0 commit comments

Comments
 (0)