浏览代码

daemon: make supportsSeccomp a const

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 年之前
父节点
当前提交
717575b585
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      daemon/seccomp_disabled.go
  2. 1 1
      daemon/seccomp_linux.go
  3. 1 1
      daemon/seccomp_unsupported.go

+ 1 - 1
daemon/seccomp_disabled.go

@@ -11,7 +11,7 @@ import (
 	"github.com/docker/docker/container"
 	"github.com/docker/docker/container"
 )
 )
 
 
-var supportsSeccomp = false
+const supportsSeccomp = false
 
 
 // WithSeccomp sets the seccomp profile
 // WithSeccomp sets the seccomp profile
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {

+ 1 - 1
daemon/seccomp_linux.go

@@ -14,7 +14,7 @@ import (
 	"github.com/sirupsen/logrus"
 	"github.com/sirupsen/logrus"
 )
 )
 
 
-var supportsSeccomp = true
+const supportsSeccomp = true
 
 
 // WithSeccomp sets the seccomp profile
 // WithSeccomp sets the seccomp profile
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {

+ 1 - 1
daemon/seccomp_unsupported.go

@@ -10,7 +10,7 @@ import (
 	"github.com/docker/docker/container"
 	"github.com/docker/docker/container"
 )
 )
 
 
-var supportsSeccomp = false
+const supportsSeccomp = false
 
 
 // WithSeccomp sets the seccomp profile
 // WithSeccomp sets the seccomp profile
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
 func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {