From f307cfc93975afaf3dd86c40e7e2ddc625b0bf06 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 May 2016 22:16:10 -0700 Subject: [PATCH] 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 --- specs-go/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs-go/config.go b/specs-go/config.go index fda11eec..22cb4153 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -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