Skip to content

Commit adea03f

Browse files
author
Mrunal Patel
committed
Merge pull request #431 from wking/platform-specific-solaris
specs-go/config: Make Linux and Solaris omitempty
2 parents 040712a + 5c2193f commit adea03f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
207207

208208
* **`linux`** (object, optional) [Linux-specific configuration](config-linux.md).
209209
This should only be set if **`platform.os`** is `linux`.
210+
* **`solaris`** (object, optional) [Solaris-specific configuration](config-solaris.md).
211+
This should only be set if **`platform.os`** is `solaris`.
210212

211213
### Example (Linux)
212214

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)