refactor: remove netns_linux_*.go files and use map instead

This commit is contained in:
Hubert 2015-09-16 16:47:11 +02:00
parent 3195ea9cc6
commit 3e1d42c9bc
7 changed files with 10 additions and 42 deletions

View File

@ -7,11 +7,21 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
"syscall"
)
var SYS_SETNS = map[string]uintptr{
"386": 346,
"amd64": 308,
"arm64": 268,
"arm": 375,
"ppc64le": 350,
"s390x": 339,
}[runtime.GOARCH]
const (
// Deprecated: use syscall pkg instead (go >= 1.5 needed).
CLONE_NEWUTS = 0x04000000 /* New utsname group? */

View File

@ -1,7 +0,0 @@
// +build linux,386
package netns
const (
SYS_SETNS = 346
)

View File

@ -1,7 +0,0 @@
// +build linux,amd64
package netns
const (
SYS_SETNS = 308
)

View File

@ -1,7 +0,0 @@
// +build linux,arm
package netns
const (
SYS_SETNS = 375
)

View File

@ -1,7 +0,0 @@
// +build linux,arm64
package netns
const (
SYS_SETNS = 268
)

View File

@ -1,7 +0,0 @@
// +build linux,ppc64le
package netns
const (
SYS_SETNS = 350
)

View File

@ -1,7 +0,0 @@
// +build linux,s390x
package netns
const (
SYS_SETNS = 339
)