File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff 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.
451453func Get [T any ](m SearchAttributesMap , sa typedSearchAttribute [T ]) (val T , ok bool ) {
452454 var zero T
453455 if m .values == nil {
You can’t perform that action at this time.
0 commit comments