Browse Source

check options for nil

Fixes #318
Georgy Buranov 10 years ago
committed by Will Norris
parent
commit
e81e98e6a9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      github/search.go

+ 1
- 1
github/search.go View File

@ -148,7 +148,7 @@ func (s *SearchService) search(searchType string, query string, opt *SearchOptio
return nil, err
}
if opt.TextMatch {
if opt != nil && opt.TextMatch {
// Accept header defaults to "application/vnd.github.v3+json"
// We change it here to fetch back text-match metadata
req.Header.Set("Accept", "application/vnd.github.v3.text-match+json")


Loading…
Cancel
Save