github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/pkg/parsers/kernel/uname_linux.go (about)

     1  package kernel
     2  
     3  import "golang.org/x/sys/unix"
     4  
     5  // Utsname represents the system name structure.
     6  // It is passthrough for unix.Utsname in order to make it portable with
     7  // other platforms where it is not available.
     8  type Utsname unix.Utsname
     9  
    10  func uname() (*unix.Utsname, error) {
    11  	uts := &unix.Utsname{}
    12  
    13  	if err := unix.Uname(uts); err != nil {
    14  		return nil, err
    15  	}
    16  	return uts, nil
    17  }