Atlas › Test

TestFieldMaskHasSubPath

Exact test identity: go.temporal.io/server/common/util/TestFieldMaskHasSubPath

Package
go.temporal.io/server/common/util
Suite / test hierarchy
TestFieldMaskHasSubPath
Test
TestFieldMaskHasSubPath
Introduced at
TestFieldMaskHasSubPath Frontier kind: Test frontier
Covered ranges
3
Covered lines
7
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/util/proto.go 7 covered LOC · 3 ranges

Open complete file

48 }
49
50 > func FieldMaskHasSubPath(fieldMaskPaths map[string]struct{}, path string) bool { proto.go
51 > prefix := strings.TrimSuffix(path, ".") + "."
52 > for field := range fieldMaskPaths {
53 > if strings.HasPrefix(field, prefix) {
54 > return true proto.go
55 > }
56 }
57 > return false proto.go
58 }
59