mirror of
https://github.com/hashicorp/packer.git
synced 2026-03-12 05:32:32 -04:00
cty's new "refinements" concept allows us to reduce the range of unknown values from our functions. This initial changeset focuses only on declaring which functions are guaranteed to return a non-null result, which is a helpful baseline refinement because it allows "== null" and "!= null" tests to produce known results even when the given value is otherwise unknown. This commit also includes some updates to test results that are now refined based on cty's own built-in refinement behaviors, just as a result of us having updated cty in the previous commit.
9 lines
155 B
Go
9 lines
155 B
Go
package function
|
|
|
|
import (
|
|
"github.com/zclconf/go-cty/cty"
|
|
)
|
|
|
|
func refineNotNull(b *cty.RefinementBuilder) *cty.RefinementBuilder {
|
|
return b.NotNull()
|
|
}
|