Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to pkg/parsers/filter. Adjust imports and package references. Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
parent
de3aec0865
commit
c91872166b
9 changed files with 522 additions and 0 deletions
18
parsers/kernel/uname_linux.go
Normal file
18
parsers/kernel/uname_linux.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
// +build amd64
|
||||
|
||||
package kernel
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
type Utsname syscall.Utsname
|
||||
|
||||
func uname() (*syscall.Utsname, error) {
|
||||
uts := &syscall.Utsname{}
|
||||
|
||||
if err := syscall.Uname(uts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return uts, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue