From 48c2da3cd52430e0883ad189d400a74c0f85d031 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Wed, 16 Nov 2016 16:21:25 -0800 Subject: [PATCH] api: Remove omitempty tag on Parallelism It doesn't make sense to use omitempty here. 0 is a meaningful value and it's different from the default. If someone sets Parallelism to 0, we want to show that Parallelism is 0, not hide the field. Signed-off-by: Aaron Lehmann (cherry picked from commit d8b8b129948ef8586f5b2f576533952419e302f2) Signed-off-by: Victor Vieux --- api/types/swarm/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/types/swarm/service.go b/api/types/swarm/service.go index 0046387366..2cf2642c1f 100644 --- a/api/types/swarm/service.go +++ b/api/types/swarm/service.go @@ -74,7 +74,7 @@ const ( type UpdateConfig struct { // Maximum number of tasks to be updated in one iteration. // 0 means unlimited parallelism. - Parallelism uint64 `json:",omitempty"` + Parallelism uint64 // Amount of time between updates. Delay time.Duration `json:",omitempty"`