Browse Source

delete unused code

Paul 6 years ago
parent
commit
31af70039c
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      middleware/auth/session_redis.go

+ 2
- 6
middleware/auth/session_redis.go View File

2
 
2
 
3
 import (
3
 import (
4
 	"github.com/go-redis/redis"
4
 	"github.com/go-redis/redis"
5
-	"sync"
6
 	"time"
5
 	"time"
7
 )
6
 )
8
 
7
 
9
-type RedisSessionStore struct {
10
-	once   *sync.Once
11
-	client *redis.Client
12
-}
8
+type RedisSessionStore struct{ client *redis.Client }
13
 
9
 
14
 func NewRedisSessionStore(address string, password string) *RedisSessionStore {
10
 func NewRedisSessionStore(address string, password string) *RedisSessionStore {
15
-	session := &RedisSessionStore{once: &sync.Once{}}
11
+	session := &RedisSessionStore{}
16
 	session.client = redis.NewClient(&redis.Options{
12
 	session.client = redis.NewClient(&redis.Options{
17
 		Addr:     address,
13
 		Addr:     address,
18
 		Password: password,
14
 		Password: password,