This question already has an answer here:
I'm trying to install a redistore back end for my Gorilla sessions but I keep getting undefined errors. Here is the documentation I did run go get on the packages but the package import error says that it is imported but not used.
error:
undefined: NewRediStore
code:
package main
import (
...
"github.com/gorilla/sessions"
"gopkg.in/boj/redistore.v1"
)
func main() {
// Fetch new store.
store, err := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key"))
if err != nil {
panic(err)
}
defer store.Close()
...
}
</div>