MCPcopy Create free account
hub / github.com/goinaction/code / Register

Function Register

chapter2/sample/search/search.go:60–67  ·  view source on GitHub ↗

Register is called to register a matcher for use by the program.

(feedType string, matcher Matcher)

Source from the content-addressed store, hash-verified

58
59// Register is called to register a matcher for use by the program.
60func Register(feedType string, matcher Matcher) {
61 if _, exists := matchers[feedType]; exists {
62 log.Fatalln(feedType, "Matcher already registered")
63 }
64
65 log.Println("Register", feedType, "matcher")
66 matchers[feedType] = matcher
67}

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected