pkg/parsers/kernel: un-export Utsname
It's only used internally to allow the "unsupported" stub. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
775dcab7a2
commit
4386e3f7c0
|
@ -2,11 +2,6 @@ package kernel // import "github.com/docker/docker/pkg/parsers/kernel"
|
||||||
|
|
||||||
import "golang.org/x/sys/unix"
|
import "golang.org/x/sys/unix"
|
||||||
|
|
||||||
// Utsname represents the system name structure.
|
|
||||||
// It is passthrough for unix.Utsname in order to make it portable with
|
|
||||||
// other platforms where it is not available.
|
|
||||||
type Utsname unix.Utsname
|
|
||||||
|
|
||||||
func uname() (*unix.Utsname, error) {
|
func uname() (*unix.Utsname, error) {
|
||||||
uts := &unix.Utsname{}
|
uts := &unix.Utsname{}
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,12 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Utsname represents the system name structure.
|
// utsName represents the system name structure. It is defined here to make it
|
||||||
// It is defined here to make it portable as it is available on linux but not
|
// portable as it is available on Linux but not on Windows.
|
||||||
// on windows.
|
type utsName struct {
|
||||||
type Utsname struct {
|
|
||||||
Release [65]byte
|
Release [65]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func uname() (*Utsname, error) {
|
func uname() (*utsName, error) {
|
||||||
return nil, errors.New("Kernel version detection is available only on linux")
|
return nil, errors.New("kernel version detection is only available on linux")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue