Code Monkey home page Code Monkey logo

ginblog's Issues

help: Key "github.com/gin-contrib/sessions" does not exist

There is a error When I try to run ginblog.

2017/06/23 03:11:36 [Recovery] panic recovered:
GET / HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: zh-CN,zh;q=0.8
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Key "github.com/gin-contrib/sessions" does not exist
/usr/local/go/src/runtime/panic.go:458 (0x2c8c3)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/context.go:180 (0x12c521)
(*Context).MustGet: panic("Key "" + key + "" does not exist")
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-contrib/sessions/sessions.go:146 (0x327ed4)
Default: return c.MustGet(DefaultKey).(Session)
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/utrack/gin-csrf/csrf.go:90 (0x13e859)
Middleware.func1: session := sessions.Default(c)
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/context.go:97 (0x12beea)
(*Context).Next: c.handlersc.index
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/contrib/sessions/sessions.go:65 (0x12b309)
Sessions.func1: c.Next()
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/context.go:97 (0x12beea)
(*Context).Next: c.handlersc.index
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/recovery.go:45 (0x13bcca)
RecoveryWithWriter.func1: c.Next()
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/context.go:97 (0x12beea)
(*Context).Next: c.handlersc.index
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/logger.go:72 (0x13adbf)
LoggerWithWriter.func1: c.Next()
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/context.go:97 (0x12beea)
(*Context).Next: c.handlersc.index
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/gin.go:284 (0x13227e)
(*Engine).handleHTTPRequest: context.Next()
/Users/ocean/Documents/oceanbj/src/mygo/src/github.com/gin-gonic/gin/gin.go:265 (0x131b60)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/go/src/net/http/server.go:2202 (0xcd52d)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1579 (0xc9e97)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:2086 (0x5b671)
goexit: BYTE $0x90 // NOP

when I imported "github.com/gin-contrib/sessions" in main.go
report:

Key "github.com/gin-gonic/contrib/sessions" does not exist

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.