Commit 965e585
committed
generate: Adjust to Spec.Linux being a pointer
Catch up with opencontainers/runtime-spec@6323157 (specs-go/config:
Make Linux and Solaris omitempty (again), 2016-06-17, #502).
The "does the marshaled JSON look like '{}'?" check is a pretty cheap
trick, but it was the easiest way I could think of for "is there
anything useful in here?". An alternative approach that conditionally
added an &rspec.Linux{} only if needed seemed too tedious.
Signed-off-by: W. Trevor King <wking@tremily.us>1 parent da4db68 commit 965e585
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
228 | 233 | | |
229 | 234 | | |
230 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
| |||
807 | 820 | | |
808 | 821 | | |
809 | 822 | | |
810 | | - | |
| 823 | + | |
811 | 824 | | |
812 | 825 | | |
813 | 826 | | |
| |||
0 commit comments