podman/pkg/specgen/generate
Paul Holzinger 51fbf3da9e
enable gocritic linter
The linter ensures a common code style.
- use switch/case instead of else if
- use if instead of switch/case for single case statement
- add space between comment and text
- detect the use of defer with os.Exit()
- use short form var += "..." instead of var = var + "..."
- detect problems with append()
```
newSlice := append(orgSlice, val)
```
  This could lead to nasty bugs because the orgSlice will be changed in
  place if it has enough capacity too hold the new elements. Thus we
  newSlice might not be a copy.

Of course most of the changes are just cosmetic and do not cause any
logic errors but I think it is a good idea to enforce a common style.
This should help maintainability.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-26 18:12:22 +02:00
..
kube enable gocritic linter 2022-04-26 18:12:22 +02:00
config_linux.go Switch all calls to filepath.Walk to filepath.WalkDir 2022-03-27 07:18:25 -04:00
config_linux_cgo.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
config_linux_nocgo.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
config_linux_test.go Add filepath glob support to --security-opt unmask 2021-05-04 14:40:43 -04:00
container.go enable gocritic linter 2022-04-26 18:12:22 +02:00
container_create.go enable gocritic linter 2022-04-26 18:12:22 +02:00
namespaces.go enable gocritic linter 2022-04-26 18:12:22 +02:00
oci.go enable gocritic linter 2022-04-26 18:12:22 +02:00
pod_create.go enable unparam linter 2022-04-25 13:23:20 +02:00
ports.go enable unparam linter 2022-04-25 13:23:20 +02:00
ports_bench_test.go fix a number of errcheck issues 2022-03-22 13:15:28 +01:00
ports_test.go use libnetwork from c/common 2022-01-12 17:07:30 +01:00
security.go Add support for ipc namespace modes "none, private, sharable" 2022-04-12 13:35:51 -04:00
storage.go Remove error stutter 2022-03-25 21:47:04 -04:00
validate.go enable gocritic linter 2022-04-26 18:12:22 +02:00