Atlas › Test
ExampleStringVariable
Exact test identity: go.temporal.io/server/common/routing/ExampleStringVariable
- Package
go.temporal.io/server/common/routing
- Suite / test hierarchy
ExampleStringVariable
- Test
ExampleStringVariable
- Introduced at
- route.go ×1 Frontier kind: Joint frontier
- Covered ranges
- 2
- Covered lines
- 6
- Covered files
- 1
Covered source
Expand a file to inspect source; the > gutter marks covered lines.
go.temporal.io/server/common/routing/route.go 6 covered LOC · 2 ranges
Open complete file
128
129
// StringVariable returns a [Component] that represents a string variable in a Route.
130
>
func StringVariable[T any](name string, getter func(*T) *string) stringVariable[T] {
route.go
131
>
return stringVariable[T]{name, getter}
132
>
}
133
134
type stringVariable[T any] struct {
137
}
138
139
>
func (s stringVariable[T]) Representation() string {
route.go
140
>
return "{" + s.name + "}"
141
>
}
142
143
func (s stringVariable[T]) Serialize(t T) string {