mirror of https://github.com/vishvananda/netns
dosc: fix golint errors
This commit is contained in:
parent
3e1d42c9bc
commit
f19e34ff16
2
netns.go
2
netns.go
|
@ -61,7 +61,7 @@ func (ns *NsHandle) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Get an empty (closed) NsHandle
|
||||
// None gets an empty (closed) NsHandle.
|
||||
func None() NsHandle {
|
||||
return NsHandle(-1)
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
// SYS_SETNS syscall allows changing the namespace of the current process.
|
||||
var SYS_SETNS = map[string]uintptr{
|
||||
"386": 346,
|
||||
"amd64": 308,
|
||||
|
@ -22,8 +23,8 @@ var SYS_SETNS = map[string]uintptr{
|
|||
"s390x": 339,
|
||||
}[runtime.GOARCH]
|
||||
|
||||
// Deprecated: use syscall pkg instead (go >= 1.5 needed).
|
||||
const (
|
||||
// Deprecated: use syscall pkg instead (go >= 1.5 needed).
|
||||
CLONE_NEWUTS = 0x04000000 /* New utsname group? */
|
||||
CLONE_NEWIPC = 0x08000000 /* New ipcs */
|
||||
CLONE_NEWUSER = 0x10000000 /* New user namespace */
|
||||
|
|
Loading…
Reference in New Issue