Remember scanned URLs

This commit is contained in:
Richard Patel
2018-10-28 17:07:30 +01:00
parent c196b6f20d
commit b1c40767e0
7 changed files with 89 additions and 61 deletions

View File

@@ -12,7 +12,6 @@ import (
"path"
"strconv"
"strings"
"sync"
"time"
)
@@ -20,15 +19,8 @@ var client fasthttp.Client
var ErrRateLimit = errors.New("too many requests")
var ErrForbidden = errors.New("access denied")
type RemoteDir struct {
Wait sync.WaitGroup
BaseUri url.URL
lock sync.Mutex
Files []File
}
func NewRemoteDir(u url.URL) *RemoteDir {
return &RemoteDir{ BaseUri: u }
func NewRemoteDir(u url.URL) *OD {
return &OD{ BaseUri: u }
}
func GetDir(j *Job, f *File) (links []url.URL, err error) {