Skip to content

Commit 73618b4

Browse files
Fixed main for default case.
1 parent 3609311 commit 73618b4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/chapter2/search/main.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ func main() {
3030
// Create the right type of matcher for this search.
3131
switch site.Type {
3232
case "rss":
33-
matcher = new(rss.Search)
33+
var search *rss.Search
34+
matcher = search
35+
36+
default:
37+
log.Fatalln("Invalid Type")
3438
}
3539

3640
// Launch the goroutine to perform the search.

0 commit comments

Comments
 (0)