From 34b854f965dea76aa094ec28fb64c3113f866fdc Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 9 Nov 2020 15:34:26 +0100 Subject: [PATCH] daemon: un-export ModifyRootKeyLimit() it's only used internally, so no need to export Signed-off-by: Sebastiaan van Stijn --- daemon/daemon.go | 2 +- daemon/keys.go | 4 ++-- daemon/keys_unsupported.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 90a2e583f5..43e032d4ef 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -751,7 +751,7 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S } // Ensure that we have a correct root key limit for launching containers. - if err := ModifyRootKeyLimit(); err != nil { + if err := modifyRootKeyLimit(); err != nil { logrus.Warnf("unable to modify root key limit, number of containers could be limited by this quota: %v", err) } diff --git a/daemon/keys.go b/daemon/keys.go index 946eaaab1c..c5b5df6e2d 100644 --- a/daemon/keys.go +++ b/daemon/keys.go @@ -18,10 +18,10 @@ const ( rootKeyByteMultiplier = 25 ) -// ModifyRootKeyLimit checks to see if the root key limit is set to +// modifyRootKeyLimit checks to see if the root key limit is set to // at least 1000000 and changes it to that limit along with the maxbytes // allocated to the keys at a 25 to 1 multiplier. -func ModifyRootKeyLimit() error { +func modifyRootKeyLimit() error { value, err := readRootKeyLimit(rootKeyFile) if err != nil { return err diff --git a/daemon/keys_unsupported.go b/daemon/keys_unsupported.go index 2ccdb576d7..3051979392 100644 --- a/daemon/keys_unsupported.go +++ b/daemon/keys_unsupported.go @@ -2,7 +2,7 @@ package daemon // import "github.com/docker/docker/daemon" -// ModifyRootKeyLimit is a noop on unsupported platforms. -func ModifyRootKeyLimit() error { +// modifyRootKeyLimit is a noop on unsupported platforms. +func modifyRootKeyLimit() error { return nil }