From 7357ab16e8a68a33b3a0b150af65bc06e2bc17ae Mon Sep 17 00:00:00 2001 From: Gao feng Date: Thu, 6 Aug 2015 10:39:32 +0800 Subject: [PATCH] Move User struct to spec.go Otherwise User struct will not be found on other platform Signed-off-by: Gao feng --- spec.go | 10 ++++++++++ spec_linux.go | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/spec.go b/spec.go index 2100cca39..ee360bf0c 100644 --- a/spec.go +++ b/spec.go @@ -55,6 +55,16 @@ type Process struct { Cwd string `json:"cwd"` } +// User specifies user and group information for the container's main process +type User struct { + // Uid is the user id + UID int32 `json:"uid"` + // Gid is the group id + GID int32 `json:"gid"` + // AdditionalGids are additional group ids set for the container's process + AdditionalGids []int32 `json:"additionalGids"` +} + // Root contains information about the container's root filesystem on the host. type Root struct { // Path is the absolute path to the container's root filesystem. diff --git a/spec_linux.go b/spec_linux.go index 3c82db4b4..4ab4b18a7 100644 --- a/spec_linux.go +++ b/spec_linux.go @@ -32,17 +32,6 @@ type Linux struct { RootfsPropagation string `json:"rootfsPropagation"` } -// User specifies Linux specific user and group information for the container's -// main process -type User struct { - // Uid is the user id - UID int32 `json:"uid"` - // Gid is the group id - GID int32 `json:"gid"` - // AdditionalGids are additional group ids set for the container's process - AdditionalGids []int32 `json:"additionalGids"` -} - // Namespace is the configuration for a Linux namespace type Namespace struct { // Type is the type of Linux namespace