1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/parsers/kernel/uname_linux.go

20 lines
392 B
Go
Raw Normal View History

package kernel
2013-05-15 20:40:47 -04:00
import (
"syscall"
)
// Utsname represents the system name structure.
// It is passthgrouh for syscall.Utsname in order to make it portable with
// other platforms where it is not available.
type Utsname syscall.Utsname
2013-05-20 13:43:09 -04:00
func uname() (*syscall.Utsname, error) {
2013-05-15 20:40:47 -04:00
uts := &syscall.Utsname{}
if err := syscall.Uname(uts); err != nil {
return nil, err
}
return uts, nil
}