Skip to content

Commit

Permalink
specs-go/config: Add omitempty to LinuxSyscall.Args
Browse files Browse the repository at this point in the history
It used to have this, but the omitempty was dropped in 652323c
(improve seccomp format to be more expressive, 2017-01-13, opencontainers#657).
However, the docs that landed in 3ca5c6c (config-linux.md: fix
seccomp, 2017-03-02, opencontainers#706) list the property as optional, and if it is
optional, we can leave it unset instead of serializing an empty array.

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Apr 7, 2017
1 parent 0946333 commit bb4cca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ type LinuxSeccompArg struct {
type LinuxSyscall struct {
Names []string `json:"names"`
Action LinuxSeccompAction `json:"action"`
Args []LinuxSeccompArg `json:"args"`
Args []LinuxSeccompArg `json:"args,omitempty"`
}

// LinuxIntelRdt has container runtime resource constraints
Expand Down

0 comments on commit bb4cca7

Please sign in to comment.