Unescape results & don't recrawl 404

This commit is contained in:
Richard Patel
2018-11-17 01:21:20 +01:00
parent 145d37f84a
commit f1687679ab
5 changed files with 80 additions and 15 deletions

View File

@@ -1,8 +1,17 @@
package main
import "errors"
import (
"errors"
"fmt"
)
var ErrRateLimit = errors.New("too many requests")
var ErrForbidden = errors.New("access denied")
var ErrKnown = errors.New("already crawled")
type HttpError struct {
code int
}
func (e HttpError) Error() string {
return fmt.Sprintf("http status %d", e.code)
}