Skip to content

Commit c6a1249

Browse files
With empty struct don't use a pointer
1 parent a33d26f commit c6a1249

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎chapter2/sample/search/default.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ type defaultMatcher struct{}
55

66
// init registers the default matcher with the program.
77
func init() {
8-
var matcher *defaultMatcher
8+
var matcher defaultMatcher
99
Register("default", matcher)
1010
}
1111

1212
// Search implements the behavior for the default matcher.
13-
func (m *defaultMatcher) Search(feed *Feed, searchTerm string) ([]*Result, error) {
13+
func (m defaultMatcher) Search(feed *Feed, searchTerm string) ([]*Result, error) {
1414
return nil, nil
1515
}

0 commit comments

Comments
 (0)