mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-18 12:48:08 +00:00
Refactor testitem-set (#668)
* set: default true Refactor testitem-set to be default true * fix typo Co-authored-by: Liz Rice <liz@lizrice.com> Co-authored-by: Liz Rice <liz@lizrice.com>
This commit is contained in:
parent
68c8764ea8
commit
10f4e6c691
@ -398,3 +398,16 @@ func toNumeric(a, b string) (c, d int, err error) {
|
||||
|
||||
return c, d, nil
|
||||
}
|
||||
|
||||
func (t *testItem) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
type buildTest testItem
|
||||
|
||||
// Make Set parameter to be true by default.
|
||||
newTestItem := buildTest{Set: true}
|
||||
err := unmarshal(&newTestItem)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*t = testItem(newTestItem)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user