Skip to content

Commit bb4cca7

Browse files
committed
specs-go/config: Add omitempty to LinuxSyscall.Args
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>
1 parent 0946333 commit bb4cca7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ type LinuxSeccompArg struct {
551551
type LinuxSyscall struct {
552552
Names []string `json:"names"`
553553
Action LinuxSeccompAction `json:"action"`
554-
Args []LinuxSeccompArg `json:"args"`
554+
Args []LinuxSeccompArg `json:"args,omitempty"`
555555
}
556556

557557
// LinuxIntelRdt has container runtime resource constraints

0 commit comments

Comments
 (0)