Skip to content

Commit

Permalink
feature: add SetCategories func in action model
Browse files Browse the repository at this point in the history
Signed-off-by: xcaspar <[email protected]>
  • Loading branch information
xcaspar authored and tiny-x committed Mar 5, 2021
1 parent a444216 commit 2c541c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ type ExpActionCommandSpec interface {

// Scenario categories
Categories() []string

// SetCategories
SetCategories(categories []string)
}

type ExpFlagSpec interface {
Expand Down Expand Up @@ -208,6 +211,10 @@ func (b *BaseExpActionCommandSpec) Categories() []string {
return b.ActionCategories
}

func (b *BaseExpActionCommandSpec) SetCategories(categories []string) {
b.ActionCategories = categories
}

// ActionModel for yaml file
type ActionModel struct {
ActionName string `yaml:"action"`
Expand Down Expand Up @@ -282,6 +289,10 @@ func (am *ActionModel) Categories() []string {
return am.ActionCategories
}

func (am *ActionModel) SetCategories(categories []string) {
am.ActionCategories = categories
}

type ExpPrepareModel struct {
PrepareType string `yaml:"type"`
PrepareFlags []ExpFlag `yaml:"flags"`
Expand Down

0 comments on commit 2c541c4

Please sign in to comment.