Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
unparam and exportloopref already work without changes.
For revive I had to silence many naming issues. I decided to silence them
instead of changing the name because I didn't want to break any code.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Add a new libnetwork/etchosts package to manage reading/writing hosts files.
This package exports four functions New(), Add(), AddIfExists() and Remove().
See the godoc comments on the functions.
Both podman and buildah should use this functions to make sure files are
generated identical.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>