File tree Expand file tree Collapse file tree 11 files changed +20
-66
lines changed
Expand file tree Collapse file tree 11 files changed +20
-66
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Quick view
2525-----------
2626
2727``` go
28- import " github.com /kataras/go-sessions"
28+ import " gopkg.in /kataras/go-sessions.v0 "
2929
3030sess := sessions.Start (http.ResponseWriter , *http.Request )
3131sess.ID () string
@@ -49,7 +49,7 @@ Installation
4949The only requirement is the [ Go Programming Language] ( https://golang.org/dl ) , at least v1.7.
5050
5151``` bash
52- $ go get -u github.com /kataras/go-sessions
52+ $ go get -u gopkg.in /kataras/go-sessions.v0
5353```
5454
5555Features
@@ -118,7 +118,7 @@ package main
118118
119119import (
120120 " fmt"
121- " github.com /kataras/go-sessions"
121+ " gopkg.in /kataras/go-sessions.v0 "
122122 " net/http"
123123)
124124
@@ -200,7 +200,7 @@ package main
200200
201201import (
202202 " fmt"
203- " github.com /kataras/go-sessions"
203+ " gopkg.in /kataras/go-sessions.v0 "
204204 " github.com/valyala/fasthttp"
205205)
206206
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package main
44
55import (
66 "fmt"
7- "github.com /kataras/go-sessions"
7+ "gopkg.in /kataras/go-sessions.v0 "
88 "net/http"
99)
1010
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package main
44
55import (
66 "fmt"
7- "github.com /kataras/go-sessions"
7+ "gopkg.in /kataras/go-sessions.v0 "
88 "net/http"
99 "time"
1010)
@@ -29,18 +29,6 @@ func main() {
2929 }
3030
3131 sess := mySessions .Start (res , req ) // init the session
32- // mySessions.Start returns:
33- // type Session interface {
34- // ID() string
35- // Get(string) interface{}
36- // GetString(key string) string
37- // GetInt(key string) int
38- // GetAll() map[string]interface{}
39- // VisitAll(cb func(k string, v interface{}))
40- // Set(string, interface{})
41- // Delete(string)
42- // Clear()
43- //}
4432
4533 for k , v := range values {
4634 sess .Set (k , v ) // fill session, set each of the key-value pair
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ package main
44
55import (
66 "fmt"
7- "github.com /kataras/go-sessions"
8- "github.com /kataras/go-sessions/sessiondb/redis"
9- "github.com /kataras/go-sessions/sessiondb/redis/service"
7+ "gopkg.in /kataras/go-sessions.v0 "
8+ "gopkg.in /kataras/go-sessions.v0 /sessiondb/redis"
9+ "gopkg.in /kataras/go-sessions.v0 /sessiondb/redis/service"
1010 "net/http"
1111 "time"
1212)
@@ -44,18 +44,7 @@ func main() {
4444 }
4545
4646 sess := mySessions .Start (res , req ) // init the session
47- // mySessions.Start returns:
48- // type Session interface {
49- // ID() string
50- // Get(string) interface{}
51- // GetString(key string) string
52- // GetInt(key string) int
53- // GetAll() map[string]interface{}
54- // VisitAll(cb func(k string, v interface{}))
55- // Set(string, interface{})
56- // Delete(string)
57- // Clear()
58- //}
47+
5948 for k , v := range values {
6049 sess .Set (k , v ) // fill session, set each of the key-value pair
6150 }
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import (
1111 "syscall"
1212 "time"
1313
14- "github.com /kataras/go-sessions"
15- "github.com /kataras/go-sessions/sessiondb/leveldb"
14+ "gopkg.in /kataras/go-sessions.v0 "
15+ "gopkg.in /kataras/go-sessions.v0 /sessiondb/leveldb"
1616)
1717
1818var mySessionsConfig = sessions.Config {Cookie : "mysessioncookieid" ,
@@ -48,18 +48,7 @@ func Main() {
4848 }
4949
5050 sess := mySessions .Start (res , req ) // init the session
51- // mySessions.Start returns:
52- // type Session interface {
53- // ID() string
54- // Get(string) interface{}
55- // GetString(key string) string
56- // GetInt(key string) int
57- // GetAll() map[string]interface{}
58- // VisitAll(cb func(k string, v interface{}))
59- // Set(string, interface{})
60- // Delete(string)
61- // Clear()
62- //}
51+
6352 for k , v := range values {
6453 sess .Set (k , v ) // fill session, set each of the key-value pair
6554 }
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package main
44
55import (
66 "fmt"
7- "github.com/kataras/go-sessions"
87 "github.com/valyala/fasthttp"
8+ "gopkg.in/kataras/go-sessions.v0"
99)
1010
1111func main () {
@@ -19,18 +19,6 @@ func main() {
1919 }
2020
2121 sess := sessions .StartFasthttp (reqCtx ) // init the session
22- // sessions.StartFasthttp returns:
23- // type Session interface {
24- // ID() string
25- // Get(string) interface{}
26- // GetString(key string) string
27- // GetInt(key string) int
28- // GetAll() map[string]interface{}
29- // VisitAll(cb func(k string, v interface{}))
30- // Set(string, interface{})
31- // Delete(string)
32- // Clear()
33- //}
3422
3523 for k , v := range values {
3624 sess .Set (k , v ) // fill session, set each of the key-value pair
Original file line number Diff line number Diff line change 11package sessions
22
33import (
4- "github.com /kataras/go-errors"
4+ "gopkg.in /kataras/go-errors.v0 "
55 "strconv"
66 "sync"
77 "time"
Original file line number Diff line number Diff line change 66 "runtime"
77 "time"
88
9- "github.com /kataras/go-sessions/sessiondb/leveldb/record"
9+ "gopkg.in /kataras/go-sessions.v0 /sessiondb/leveldb/record"
1010
1111 "github.com/syndtr/goleveldb/leveldb"
1212 "github.com/syndtr/goleveldb/leveldb/iterator"
Original file line number Diff line number Diff line change 44 "bytes"
55 "encoding/gob"
66
7- "github.com /kataras/go-sessions/sessiondb/redis/service"
7+ "gopkg.in /kataras/go-sessions.v0 /sessiondb/redis/service"
88)
99
1010// Database the redis database for q sessions
Original file line number Diff line number Diff line change 44 "time"
55
66 "github.com/garyburd/redigo/redis"
7- "github.com /kataras/go-errors"
7+ "gopkg.in /kataras/go-errors.v0 "
88)
99
1010var (
You can’t perform that action at this time.
0 commit comments