From d42b44b8ff68ee3975714bb017eff64a159ce733 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 6 Apr 2017 11:56:34 -0700 Subject: [PATCH] specs-go/config: Use a pointer for Process.ConsoleSize Avoid injecting: "consoleSize":{"height":0,"width":0} when serializing with Go's stock JSON serializer. Using a pointer for this optional struct property works around [1]. [1]: https://github.com/golang/go/issues/11939 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 d48f19919..881655fce 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -34,7 +34,7 @@ type Process struct { // Terminal creates an interactive terminal for the container. Terminal bool `json:"terminal,omitempty"` // ConsoleSize specifies the size of the console. - ConsoleSize Box `json:"consoleSize,omitempty"` + ConsoleSize *Box `json:"consoleSize,omitempty"` // User specifies user information for the process. User User `json:"user"` // Args specifies the binary and arguments for the application to execute.