Skip to content

Commit

Permalink
Make the DisallowAll instance public
Browse files Browse the repository at this point in the history
  • Loading branch information
thewizardplusplus committed Jul 16, 2022
1 parent 1727854 commit 60a6ab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robotstxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (e ParseError) Error() string {
}

var AllowAll = &RobotsData{allowAll: true}
var disallowAll = &RobotsData{disallowAll: true}
var DisallowAll = &RobotsData{disallowAll: true}
var emptyGroup = &Group{}

func FromStatusAndBytes(statusCode int, body []byte) (*RobotsData, error) {
Expand All @@ -78,7 +78,7 @@ func FromStatusAndBytes(statusCode int, body []byte) (*RobotsData, error) {
// Server errors (5xx) are seen as temporary errors that result in a "full
// disallow" of crawling.
case statusCode >= 500 && statusCode < 600:
return disallowAll, nil
return DisallowAll, nil
}

return nil, errors.New("Unexpected status: " + strconv.Itoa(statusCode))
Expand Down

0 comments on commit 60a6ab8

Please sign in to comment.