moby/pkg/parsers/operatingsystem
Sebastiaan van Stijn 6059d38f21
pkg/parsers/operatingsystem: don't use strings.SplitN()
We're looking for a specific prefix, so remove the prefix instead. Also remove
redundant error-wrapping, as `os.Open()` already provides details in the error
returned;

    open /no/such/file: no such file or directory
    open /etc/os-release: permission denied

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
..
operatingsystem_linux.go pkg/parsers/operatingsystem: don't use strings.SplitN() 2022-12-21 11:09:02 +01:00
operatingsystem_linux_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
operatingsystem_unix.go pkg/parsers/operatingsystem: fix stray import 2022-07-08 18:42:20 +02:00
operatingsystem_windows.go pkg/system: move IsWindowsClient to pkg/parsers/operatingsystem 2022-03-17 10:26:50 +01:00
windows_os_string.go pkg/parsers: support Windows 11; drop ProductName 2022-03-04 16:08:34 -05:00
windows_os_string_test.go pkg/parsers: support Windows 11; drop ProductName 2022-03-04 16:08:34 -05:00