Skip to content

Commit

Permalink
change type structs encoding tag to json
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Wolf <josh@wolfs.io>
  • Loading branch information
joshrwolf committed May 6, 2023
1 parent bc23957 commit 4de02ee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/build/types/build_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ package types
// ListOption describes an optional deviation to a list, for example, a
// list of packages.
type ListOption struct {
Add []string `yaml:"add,omitempty"`
Remove []string `yaml:"remove,omitempty"`
Add []string `json:"add,omitempty"`
Remove []string `json:"remove,omitempty"`
}

// ContentsOption describes an optional deviation to an apko environment's
// contents block.
type ContentsOption struct {
Packages ListOption `yaml:"packages,omitempty"`
Packages ListOption `json:"packages,omitempty"`
}

// AccountsOption describes an optional deviation to an apko environment's
// run-as setting.
type AccountsOption struct {
RunAs string `yaml:"run-as,omitempty"`
RunAs string `json:"run-as,omitempty"`
}

// BuildOption describes an optional deviation to an apko environment.
type BuildOption struct {
Contents ContentsOption `yaml:"contents,omitempty"`
Accounts AccountsOption `yaml:"accounts,omitempty"`
Contents ContentsOption `json:"contents,omitempty"`
Accounts AccountsOption `json:"accounts,omitempty"`

Environment map[string]string `yaml:"environment,omitempty"`
Environment map[string]string `json:"environment,omitempty"`

Entrypoint ImageEntrypoint `yaml:"entrypoint,omitempty"`
Entrypoint ImageEntrypoint `json:"entrypoint,omitempty"`
}

// Apply applies a patch described by a BuildOption to an apko environment.
Expand Down

0 comments on commit 4de02ee

Please sign in to comment.