Atlas › Test

ExampleConstant

Exact test identity: go.temporal.io/server/common/routing/ExampleConstant

Package
go.temporal.io/server/common/routing
Suite / test hierarchy
ExampleConstant
Test
ExampleConstant
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

111 // Constant returns a [Component] that represents a series of constant HTTP path components in a Route.
112 // They will be joined via strings when used to construct a path or path representation.
113 > func Constant[T any](values ...string) constant[T] { route.go
114 > return values
115 > }
116
117 type constant[T any] []string
118
119 > func (s constant[T]) Representation() string { route.go
120 > return strings.Join(s, "/")
121 > }
122
123 func (s constant[T]) Serialize(T) string {