@@ -15,19 +15,19 @@ type RuntimeSpec struct {
1515// Hook specifies a command that is run at a particular event in the lifecycle of a container
1616type Hook struct {
1717 Path string `json:"path"`
18- Args []string `json:"args"`
19- Env []string `json:"env"`
18+ Args []string `json:"args,omitempty "`
19+ Env []string `json:"env,omitempty "`
2020}
2121
2222// Hooks for container setup and teardown
2323type Hooks struct {
2424 // Prestart is a list of hooks to be run before the container process is executed.
2525 // On Linux, they are run after the container namespaces are created.
26- Prestart []Hook `json:"prestart"`
26+ Prestart []Hook `json:"prestart,omitempty "`
2727 // Poststart is a list of hooks to be run after the container process is started.
28- Poststart []Hook `json:"poststart"`
28+ Poststart []Hook `json:"poststart,omitempty "`
2929 // Poststop is a list of hooks to be run after the container process exits.
30- Poststop []Hook `json:"poststop"`
30+ Poststop []Hook `json:"poststop,omitempty "`
3131}
3232
3333// Mount specifies a mount for a container
@@ -38,5 +38,5 @@ type Mount struct {
3838 // linux based systems this would be the file on the host.
3939 Source string `json:"source"`
4040 // Options are fstab style mount options.
41- Options []string `json:"options"`
41+ Options []string `json:"options,omitempty "`
4242}
0 commit comments