MCPcopy Create free account
hub / github.com/perkeep/perkeep / checkNoDups

Function checkNoDups

pkg/search/handler_test.go:861–869  ·  view source on GitHub ↗
(sliceName string, tests []handlerTest)

Source from the content-addressed store, hash-verified

859}
860
861func checkNoDups(sliceName string, tests []handlerTest) {
862 seen := map[string]bool{}
863 for _, tt := range tests {
864 if seen[tt.name] {
865 panic(fmt.Sprintf("duplicate handlerTest named %q in var %s", tt.name, sliceName))
866 }
867 seen[tt.name] = true
868 }
869}
870
871func init() {
872 checkNoDups("handlerTests", handlerTests)

Callers 2

initFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected