specs-go/config.go: Make Root.Readonly omitempty

It's an optional setting, and this change will fix the wordy:

  $ ocitools generate --template <(echo '{}')
  $ grep readonly config.json
      "readonly": false,

Instead, config.json will not contain a 'readonly' entry at all.

Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
W. Trevor King 2016-05-06 22:16:10 -07:00
parent dbce512cec
commit f307cfc939
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ type Root struct {
// Path is the absolute path to the container's root filesystem.
Path string `json:"path"`
// Readonly makes the root filesystem for the container readonly before the process is executed.
Readonly bool `json:"readonly"`
Readonly bool `json:"readonly,omitempty"`
}
// Platform specifies OS and arch information for the host system that the container