github.com/getong/docker@v1.13.1/pkg/parsers/kernel/uname_linux.go (about) 1 package kernel 2 3 import ( 4 "syscall" 5 ) 6 7 // Utsname represents the system name structure. 8 // It is passthrough for syscall.Utsname in order to make it portable with 9 // other platforms where it is not available. 10 type Utsname syscall.Utsname 11 12 func uname() (*syscall.Utsname, error) { 13 uts := &syscall.Utsname{} 14 15 if err := syscall.Uname(uts); err != nil { 16 return nil, err 17 } 18 return uts, nil 19 }