1. Use gofmt to format the code:
git ls-files \*.go | grep -Ev '/?vendor/' | xargs gofmt -w -s
2. Add gofmt to golangci-lint (it's not enabled by default).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In golang 1.19, `io/ioutil` is fully deprecated preventing Buildah from
compiling. Replace all calls with equivalent calls from the `os`
package.
Signed-off-by: Chris Evich <cevich@redhat.com>
On non-windows platforms, we can use the uname syscall to get kernel
version information. For uptime, we can use clock_gettime(CLOCK_UPTIME)
on FreeBSD but I don't have a solution for darwin or windows.
Note: the existing code which unconditionally reads from /proc builds
on all platforms but only works on linux since using /proc in this way
is a linux feature.
[NO NEW TESTS NEEDED]
Signed-off-by: Doug Rabson <dfr@rabson.org>