Add Platform struct
This struct hold information like OS and Arch for the container. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
1fa65466ea
commit
cb44dec571
10
spec.go
10
spec.go
|
@ -35,10 +35,14 @@ type Namespace struct {
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PortableSpec struct {
|
type Platform struct {
|
||||||
Version string `json:"version"`
|
|
||||||
OS string `json:"os"`
|
OS string `json:"os"`
|
||||||
Arch string `json:"arch"`
|
Arch string `json:"arch"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PortableSpec struct {
|
||||||
|
Version string `json:"version"`
|
||||||
|
Platform Platform `json:"platform"`
|
||||||
Processes []*Process `json:"processes"`
|
Processes []*Process `json:"processes"`
|
||||||
Root Root `json:"root"`
|
Root Root `json:"root"`
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
|
@ -51,8 +55,10 @@ var specCommand = cli.Command{
|
||||||
Action: func(context *cli.Context) {
|
Action: func(context *cli.Context) {
|
||||||
spec := PortableSpec{
|
spec := PortableSpec{
|
||||||
Version: version,
|
Version: version,
|
||||||
|
Platform: Platform{
|
||||||
OS: runtime.GOOS,
|
OS: runtime.GOOS,
|
||||||
Arch: runtime.GOARCH,
|
Arch: runtime.GOARCH,
|
||||||
|
},
|
||||||
Root: Root{
|
Root: Root{
|
||||||
Path: "rootfs",
|
Path: "rootfs",
|
||||||
Readonly: true,
|
Readonly: true,
|
||||||
|
|
Loading…
Reference in New Issue