Options refactored to its own file. Timeout increased to 60 sec

This commit is contained in:
Musab Gültekin
2019-06-08 20:27:45 +03:00
parent b90908066b
commit 2e3bd18430
3 changed files with 22 additions and 12 deletions

View File

@ -23,14 +23,6 @@ type Geziyor struct {
visitedURLS []string
}
// Options is custom options type for Geziyor
type Options struct {
AllowedDomains []string
StartURLs []string
ParseFunc func(response *Response)
Cache httpcache.Cache
}
func init() {
log.SetOutput(os.Stdout)
}
@ -40,7 +32,7 @@ func init() {
func NewGeziyor(opt Options) *Geziyor {
geziyor := &Geziyor{
client: &http.Client{
Timeout: time.Second * 10,
Timeout: time.Second * 60,
},
opt: opt,
}