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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get an empty (closed) NsHandle
|
// None gets an empty (closed) NsHandle.
|
||||||
func None() NsHandle {
|
func None() NsHandle {
|
||||||
return NsHandle(-1)
|
return NsHandle(-1)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// SYS_SETNS syscall allows changing the namespace of the current process.
|
||||||
var SYS_SETNS = map[string]uintptr{
|
var SYS_SETNS = map[string]uintptr{
|
||||||
"386": 346,
|
"386": 346,
|
||||||
"amd64": 308,
|
"amd64": 308,
|
||||||
|
@ -22,8 +23,8 @@ var SYS_SETNS = map[string]uintptr{
|
||||||
"s390x": 339,
|
"s390x": 339,
|
||||||
}[runtime.GOARCH]
|
}[runtime.GOARCH]
|
||||||
|
|
||||||
|
// Deprecated: use syscall pkg instead (go >= 1.5 needed).
|
||||||
const (
|
const (
|
||||||
// Deprecated: use syscall pkg instead (go >= 1.5 needed).
|
|
||||||
CLONE_NEWUTS = 0x04000000 /* New utsname group? */
|
CLONE_NEWUTS = 0x04000000 /* New utsname group? */
|
||||||
CLONE_NEWIPC = 0x08000000 /* New ipcs */
|
CLONE_NEWIPC = 0x08000000 /* New ipcs */
|
||||||
CLONE_NEWUSER = 0x10000000 /* New user namespace */
|
CLONE_NEWUSER = 0x10000000 /* New user namespace */
|
||||||
|
|
Loading…
Reference in New Issue