Skip to content

Commit cda223e

Browse files
committed
Update docs
1 parent 1114cea commit cda223e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

chasm/search_attribute.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ func NewSearchAttributesMap(values map[string]VisibilityValue) SearchAttributesM
448448
// The return type T is inferred from the SearchAttribute's type parameter.
449449
// For example, SearchAttriteBool will return a bool value.
450450
// If the value is not found, the zero value for the type T is returned and the second return value is false.
451+
// Before casting the VisibilityValue to the target type, the value is checked to ensure it is of the correct type.
452+
// If the value is found but the type does not match, the zero value for the type T is returned and the second return value is false.
451453
func Get[T any](m SearchAttributesMap, sa typedSearchAttribute[T]) (val T, ok bool) {
452454
var zero T
453455
if m.values == nil {

0 commit comments

Comments
 (0)