use dummy limiter for testing pages
This commit is contained in:
parent
7a572d7a42
commit
b93c2d4874
@ -7,6 +7,7 @@ import (
|
||||
dummycookies "github.com/egor3f/rssalchemy/internal/cookiemgr/dummy"
|
||||
"github.com/egor3f/rssalchemy/internal/dateparser"
|
||||
"github.com/egor3f/rssalchemy/internal/extractors/pwextractor"
|
||||
"github.com/egor3f/rssalchemy/internal/limiter/dummy"
|
||||
"github.com/egor3f/rssalchemy/internal/models"
|
||||
"github.com/labstack/gommon/log"
|
||||
"io"
|
||||
@ -65,6 +66,7 @@ func main() {
|
||||
},
|
||||
},
|
||||
CookieManager: dummycookies.New(),
|
||||
Limiter: &dummy.Limiter{},
|
||||
})
|
||||
if err != nil {
|
||||
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