From 99c5a3ad18a51a6dacf2b03a42bf72d45f51ea20 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Mon, 20 Feb 2017 19:17:52 -0800 Subject: [PATCH] Add even more docs around BuildArgs and *string PR #31197 made me think I needed to add more text explaing why BuildArgs needs to be a *string instead of string. Signed-off-by: Doug Davis Upstream-commit: 9419ccd706feee0531d63ec3b517f97104b5177f Component: engine --- components/engine/api/types/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/engine/api/types/client.go b/components/engine/api/types/client.go index 998cf68c5c..d9efcca46e 100644 --- a/components/engine/api/types/client.go +++ b/components/engine/api/types/client.go @@ -160,9 +160,10 @@ type ImageBuildOptions struct { ShmSize int64 Dockerfile string Ulimits []*units.Ulimit - // See the parsing of buildArgs in api/server/router/build/build_routes.go - // for an explanation of why BuildArgs needs to use *string instead of - // just a string + // BuildArgs needs to be a *string instead of just a string so that + // we can tell the difference between "" (empty string) and no value + // at all (nil). See the parsing of buildArgs in + // api/server/router/build/build_routes.go for even more info. BuildArgs map[string]*string AuthConfigs map[string]AuthConfig Context io.Reader