Skip to content

Commit b45aa77

Browse files
Merge pull request #502 from wking/optional-linux-solaris
specs-go/config: Make Linux and Solaris omitempty (again)
2 parents 0473c7e + 6323157 commit b45aa77

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

specs-go/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ type Spec struct {
2222
Annotations map[string]string `json:"annotations,omitempty"`
2323

2424
// Linux is platform specific configuration for Linux based containers.
25-
Linux Linux `json:"linux" platform:"linux,omitempty"`
25+
Linux *Linux `json:"linux,omitempty" platform:"linux"`
2626
// Solaris is platform specific configuration for Solaris containers.
27-
Solaris Solaris `json:"solaris" platform:"solaris,omitempty"`
27+
Solaris *Solaris `json:"solaris,omitempty" platform:"solaris"`
2828
}
2929

3030
// Process contains information to start a specific application inside the container.
@@ -371,9 +371,9 @@ type Solaris struct {
371371
// Specification for automatic creation of network resources for this container.
372372
Anet []Anet `json:"anet,omitempty"`
373373
// Set limit on the amount of CPU time that can be used by container.
374-
CappedCPU CappedCPU `json:"cappedCPU,omitempty"`
374+
CappedCPU *CappedCPU `json:"cappedCPU,omitempty"`
375375
// The physical and swap caps on the memory that can be used by this container.
376-
CappedMemory CappedMemory `json:"cappedMemory,omitempty"`
376+
CappedMemory *CappedMemory `json:"cappedMemory,omitempty"`
377377
}
378378

379379
// CappedCPU allows users to set limit on the amount of CPU time that can be used by container.

0 commit comments

Comments
 (0)