MCPcopy Index your code
hub / github.com/tailscale/tailscale / first

Function first

control/controlclient/map_test.go:1038–1044  ·  view source on GitHub ↗
(s []T)

Source from the content-addressed store, hash-verified

1036}
1037
1038func first[T any](s []T) T {
1039 if len(s) == 0 {
1040 var zero T
1041 return zero
1042 }
1043 return s[0]
1044}
1045
1046func TestDeltaDERPMap(t *testing.T) {
1047 regions1 := map[int]*tailcfg.DERPRegion{

Callers 1

TestNetmapForResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…