podman/pkg/machine
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
..
e2e Add podman machine test suite 2022-04-25 13:05:35 -05:00
qemu enable gocritic linter 2022-04-26 18:12:22 +02:00
wsl Merge pull request #13996 from cdoern/machine 2022-04-26 09:08:31 -04:00
config.go enable gocritic linter 2022-04-26 18:12:22 +02:00
config_test.go Machine refactor - part 1 2022-03-28 09:12:08 -05:00
connection.go Introduce podman machine init --root=t|f and podman machine set --root=t|f 2022-02-16 03:49:17 -06:00
fcos.go Add podman machine test suite 2022-04-25 13:05:35 -05:00
fedora.go enable gocritic linter 2022-04-26 18:12:22 +02:00
ignition.go Implements Windows volume/mount support 2022-04-25 13:52:27 -05:00
ignition_darwin.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_linux.go Set machine timezone 2021-12-16 12:40:20 -06:00
ignition_schema.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_windows.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
keys.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
machine_unsupported.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
pull.go Remove error stutter 2022-03-25 21:47:04 -04:00