From 3b316814f9fac27973cb4ce83eb45171105fcbae Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 6 Aug 2021 10:24:09 +0200 Subject: [PATCH] container: un-export DefaultStopTimeout It's not used outside of the package itself Signed-off-by: Sebastiaan van Stijn --- container/container.go | 2 +- container/container_unit_test.go | 4 ++-- container/container_unix.go | 4 ++-- container/container_windows.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/container/container.go b/container/container.go index 3a95d6ca84..30317a54c8 100644 --- a/container/container.go +++ b/container/container.go @@ -528,7 +528,7 @@ func (container *Container) StopTimeout() int { if container.Config.StopTimeout != nil { return *container.Config.StopTimeout } - return DefaultStopTimeout + return defaultStopTimeout } // InitDNSHostConfig ensures that the dns fields are never nil. diff --git a/container/container_unit_test.go b/container/container_unit_test.go index 0db8ac1beb..7c4476c44a 100644 --- a/container/container_unit_test.go +++ b/container/container_unit_test.go @@ -44,8 +44,8 @@ func TestContainerStopTimeout(t *testing.T) { } s := c.StopTimeout() - if s != DefaultStopTimeout { - t.Fatalf("Expected %v, got %v", DefaultStopTimeout, s) + if s != defaultStopTimeout { + t.Fatalf("Expected %v, got %v", defaultStopTimeout, s) } stopTimeout := 15 diff --git a/container/container_unix.go b/container/container_unix.go index a811192337..39ad978761 100644 --- a/container/container_unix.go +++ b/container/container_unix.go @@ -23,9 +23,9 @@ import ( ) const ( - // DefaultStopTimeout sets the default time, in seconds, to wait + // defaultStopTimeout sets the default time, in seconds, to wait // for the graceful container stop before forcefully terminating it. - DefaultStopTimeout = 10 + defaultStopTimeout = 10 containerConfigMountPath = "/" containerSecretMountPath = "/run/secrets" diff --git a/container/container_windows.go b/container/container_windows.go index 22e77b15af..d34edc44a9 100644 --- a/container/container_windows.go +++ b/container/container_windows.go @@ -17,8 +17,8 @@ const ( containerInternalSecretMountPath = `C:\ProgramData\Docker\internal\secrets` containerInternalConfigsDirPath = `C:\ProgramData\Docker\internal\configs` - // DefaultStopTimeout is the timeout (in seconds) for the shutdown call on a container - DefaultStopTimeout = 30 + // defaultStopTimeout is the timeout (in seconds) for the shutdown call on a container + defaultStopTimeout = 30 ) // UnmountIpcMount unmounts Ipc related mounts.