use dummy limiter for testing pages
This commit is contained in:
parent
2c87df4a87
commit
94b347e49f
@ -7,6 +7,7 @@ import (
|
|||||||
dummycookies "github.com/egor3f/rssalchemy/internal/cookiemgr/dummy"
|
dummycookies "github.com/egor3f/rssalchemy/internal/cookiemgr/dummy"
|
||||||
"github.com/egor3f/rssalchemy/internal/dateparser"
|
"github.com/egor3f/rssalchemy/internal/dateparser"
|
||||||
"github.com/egor3f/rssalchemy/internal/extractors/pwextractor"
|
"github.com/egor3f/rssalchemy/internal/extractors/pwextractor"
|
||||||
|
"github.com/egor3f/rssalchemy/internal/limiter/dummy"
|
||||||
"github.com/egor3f/rssalchemy/internal/models"
|
"github.com/egor3f/rssalchemy/internal/models"
|
||||||
"github.com/labstack/gommon/log"
|
"github.com/labstack/gommon/log"
|
||||||
"io"
|
"io"
|
||||||
@ -65,6 +66,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
CookieManager: dummycookies.New(),
|
CookieManager: dummycookies.New(),
|
||||||
|
Limiter: &dummy.Limiter{},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicf("create pw extractor: %v", err)
|
log.Panicf("create pw extractor: %v", err)
|
||||||
|
|||||||
13
internal/limiter/dummy/dummy.go
Normal file
13
internal/limiter/dummy/dummy.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package dummy
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Limiter struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (l *Limiter) Limit(context.Context, string) (time.Duration, error) {
|
||||||
|
return 0, nil
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user