Skip to content

Commit

Permalink
Merge pull request #47 from aquasecurity/liamg-unresolvables
Browse files Browse the repository at this point in the history
Add unresolvables for all base types
  • Loading branch information
liamg authored Dec 20, 2021
2 parents ffde69c + 93e1341 commit 9a44f3e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/bool_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func BoolDefault(value bool, metadata Metadata) BoolValue {
return b
}

func BoolUnresolvable(m Metadata) BoolValue {
b := Bool(false, m)
b.GetMetadata().isUnresolvable = true
return b
}

func BoolExplicit(value bool, metadata Metadata) BoolValue {
b := Bool(value, metadata)
b.GetMetadata().isExplicit = true
Expand Down
6 changes: 6 additions & 0 deletions types/int_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ func IntDefault(value int, m Metadata) IntValue {
return b
}

func IntUnresolvable(m Metadata) IntValue {
b := Int(0, m)
b.GetMetadata().isUnresolvable = true
return b
}

func IntExplicit(value int, m Metadata) IntValue {
b := Int(value, m)
b.GetMetadata().isExplicit = true
Expand Down
1 change: 1 addition & 0 deletions types/string_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func StringDefault(value string, m Metadata) StringValue {
b.GetMetadata().isDefault = true
return b
}

func StringUnresolvable(m Metadata) StringValue {
b := String("", m)
b.GetMetadata().isUnresolvable = true
Expand Down

0 comments on commit 9a44f3e

Please sign in to comment.