Skip to content

Commit 6163c03

Browse files
committed
rename function to fit what it is doing
Signed-off-by: Alano Terblanche <[email protected]>
1 parent 467305f commit 6163c03

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cli/command/cli.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...CLIOption)
283283

284284
meta, err := cli.contextStore.GetMetadata(cli.currentContext)
285285
if err == nil {
286-
setAllowNegativex509(meta)
286+
setGoDebug(meta)
287287
}
288288

289289
return nil
@@ -479,7 +479,7 @@ func (cli *DockerCli) getDockerEndPoint() (ep docker.Endpoint, err error) {
479479
return resolveDockerEndpoint(cli.contextStore, cn)
480480
}
481481

482-
// setAllowNegativex509 is an escape hatch that sets the GODEBUG environment
482+
// setGoDebug is an escape hatch that sets the GODEBUG environment
483483
// variable value using docker context metadata.
484484
//
485485
// {
@@ -496,7 +496,7 @@ func (cli *DockerCli) getDockerEndPoint() (ep docker.Endpoint, err error) {
496496
// This option should only be used for legacy compatibility and never in
497497
// production environments.
498498
// Use at your own risk.
499-
func setAllowNegativex509(meta store.Metadata) {
499+
func setGoDebug(meta store.Metadata) {
500500
fieldName := "GODEBUG"
501501
godebugEnv := os.Getenv(fieldName)
502502
// early return if GODEBUG is already set. We don't want to override what

cli/command/cli_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,11 @@ func TestHooksEnabled(t *testing.T) {
354354
})
355355
}
356356

357-
func TestAllowNegativex509(t *testing.T) {
357+
func TestSetGoDebug(t *testing.T) {
358358
t.Run("GODEBUG already set", func(t *testing.T) {
359359
t.Setenv("GODEBUG", "val1,val2")
360360
meta := store.Metadata{}
361-
setAllowNegativex509(meta)
361+
setGoDebug(meta)
362362
assert.Equal(t, "val1,val2", os.Getenv("GODEBUG"))
363363
})
364364
t.Run("GODEBUG in context metadata can set env", func(t *testing.T) {
@@ -369,7 +369,7 @@ func TestAllowNegativex509(t *testing.T) {
369369
},
370370
},
371371
}
372-
setAllowNegativex509(meta)
372+
setGoDebug(meta)
373373
assert.Equal(t, "val1,val2=1", os.Getenv("GODEBUG"))
374374
})
375375
}

0 commit comments

Comments
 (0)