Coder Social home page Coder Social logo

redisstorage's People

Contributors

asciimoo avatar jimsmart avatar josalmi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

redisstorage's Issues

go-redis/redis v8 support

Cannot use 'rdb.Redis' (type *"github.com/go-redis/redis/v8".Client) as type *"github.com/go-redis/redis".Client

Colly v2

I tried with simple example using colly V2, but I get the following error:

cannot use storage (variable of type *redisstorage.Storage) as storage.Storage value in argument to c.SetStorage: wrong type for method Cookies (have func(u *net/url.URL) string, want func(u *net/url.URL) string)compiler[InvalidIfaceAssign](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#InvalidIfaceAssign)

Example

import (
	"github.com/gocolly/colly/v2"
	"github.com/gocolly/redisstorage"
)
c := colly.NewCollector()

storage := &redisstorage.Storage{
    Address:  "127.0.0.1:6379",
    Password: "",
    DB:       0,
    Prefix:   "job01",
}

err := c.SetStorage(storage)
if err != nil {
    panic(err)
}

Any suggestions how to fix this issue?

wont compile anymore

`# github.com/gocolly/redisstorage
..\github.com\gocolly\redisstorage\redisstorage.go:43:25: not enough arguments in call to s.Client.cmdable.Ping
have ()
want (context.Context)
..\github.com\gocolly\redisstorage\redisstorage.go:54:20: not enough arguments in call to s.Client.cmdable.Keys
have (string)
want (context.Context, string)
..\github.com\gocolly\redisstorage\redisstorage.go:59:21: not enough arguments in call to s.Client.cmdable.Keys
have (string)
want (context.Context, string)
..\github.com\gocolly\redisstorage\redisstorage.go:66:21: not enough arguments in call to s.Client.cmdable.Del
have ([]string...)
want (context.Context, ...string)
..\github.com\gocolly\redisstorage\redisstorage.go:71:21: not enough arguments in call to s.Client.cmdable.Set
have (string, string, time.Duration)
want (context.Context, string, interface {}, time.Duration)
..\github.com\gocolly\redisstorage\redisstorage.go:76:24: not enough arguments in call to s.Client.cmdable.Get
have (string)
want (context.Context, string)
..\github.com\gocolly\redisstorage\redisstorage.go:96:21: not enough arguments in call to s.Client.cmdable.Set
have (string, string, number)
want (context.Context, string, interface {}, time.Duration)
..\github.com\gocolly\redisstorage\redisstorage.go:109:33: not enough arguments in call to s.Client.cmdable.Get
have (string)
want (context.Context, string)
..\github.com\gocolly\redisstorage\redisstorage.go:123:36: cannot use s.getQueueID() (type string) as type context.Context in argument to s.Client.cmdable.RPush:
string does not implement context.Context (missing Deadline method)
..\github.com\gocolly\redisstorage\redisstorage.go:123:36: cannot use r (type []byte) as type string in argument to s.Client.cmdable.RPush
..\github.com\gocolly\redisstorage\redisstorage.go:123:36: too many errors

Compilation finished with exit code 2
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.