From df156ab37be865f4dd8dfd781ac21a8efd4378dc Mon Sep 17 00:00:00 2001 From: flaviostutz Date: Sun, 12 Aug 2018 08:18:46 -0300 Subject: [PATCH] adding 'json:omitempty' on optional Volume fields to avoid errors with Docker Daemon --- volume/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/volume/api.go b/volume/api.go index c51c676..8b6e876 100644 --- a/volume/api.go +++ b/volume/api.go @@ -83,9 +83,9 @@ type CapabilitiesResponse struct { // Volume represents a volume object for use with `Get` and `List` requests type Volume struct { Name string - Mountpoint string - CreatedAt string - Status map[string]interface{} + Mountpoint string `json:",omitempty"` + CreatedAt string `json:",omitempty"` + Status map[string]interface{} `json:",omitempty"` } // Capability represents the list of capabilities a volume driver can return