summaryrefslogtreecommitdiff
path: root/pkg/specgen/container_validate.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-27 04:50:01 -0400
committerGitHub <noreply@github.com>2022-04-27 04:50:01 -0400
commit053b09660ffbe2df2104186c67e39be70764ff63 (patch)
treeb9d8d32e146eb1ca1a3385e61b24d276dabc1cf0 /pkg/specgen/container_validate.go
parent5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907 (diff)
parent4f8ece76fff31d31570af56e0ec4a4092e015b33 (diff)
downloadpodman-053b09660ffbe2df2104186c67e39be70764ff63.tar.gz
podman-053b09660ffbe2df2104186c67e39be70764ff63.tar.bz2
podman-053b09660ffbe2df2104186c67e39be70764ff63.zip
Merge pull request #13997 from Luap99/gocritic
enable gocritic linter
Diffstat (limited to 'pkg/specgen/container_validate.go')
-rw-r--r--pkg/specgen/container_validate.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go
index e06cd9a29..355fbc368 100644
--- a/pkg/specgen/container_validate.go
+++ b/pkg/specgen/container_validate.go
@@ -122,19 +122,19 @@ func (s *SpecGenerator) Validate() error {
}
// TODO the specgen does not appear to handle this? Should it
- //switch config.Cgroup.Cgroups {
- //case "disabled":
+ // switch config.Cgroup.Cgroups {
+ // case "disabled":
// if addedResources {
// return errors.New("cannot specify resource limits when cgroups are disabled is specified")
// }
// configSpec.Linux.Resources = &spec.LinuxResources{}
- //case "enabled", "no-conmon", "":
+ // case "enabled", "no-conmon", "":
// // Do nothing
- //default:
+ // default:
// return errors.New("unrecognized option for cgroups; supported are 'default', 'disabled', 'no-conmon'")
- //}
+ // }
invalidUlimitFormatError := errors.New("invalid default ulimit definition must be form of type=soft:hard")
- //set ulimits if not rootless
+ // set ulimits if not rootless
if len(s.ContainerResourceConfig.Rlimits) < 1 && !rootless.IsRootless() {
// Containers common defines this as something like nproc=4194304:4194304
tmpnproc := containerConfig.Ulimits()