Skip to content

Commit 047e817

Browse files
author
Antoine Pelisse
committed
Create new Empty method to get empty TypedValue from existing
1 parent 305e112 commit 047e817

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

typed/typed.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ func (tv TypedValue) NormalizeUnions(new *TypedValue) (*TypedValue, error) {
177177
return out, nil
178178
}
179179

180+
func (tv TypedValue) Empty() *TypedValue {
181+
tv.value = value.Value{Null: true}
182+
return &tv
183+
}
184+
180185
func merge(lhs, rhs *TypedValue, rule, postRule mergeRule) (*TypedValue, error) {
181186
if lhs.schema != rhs.schema {
182187
return nil, errorFormatter{}.

0 commit comments

Comments
 (0)