Browse Source

order import

Paul 6 years ago
parent
commit
1638f2025a
3 changed files with 6 additions and 3 deletions
  1. 2
    1
      middleware/auth/auth.go
  2. 2
    1
      middleware/auth/optional_auth.go
  3. 2
    1
      middleware/auth/session_redis.go

+ 2
- 1
middleware/auth/auth.go View File

2
 
2
 
3
 import (
3
 import (
4
 	"fmt"
4
 	"fmt"
5
+	"net/http"
6
+
5
 	"github.com/dgrijalva/jwt-go"
7
 	"github.com/dgrijalva/jwt-go"
6
 	"github.com/gin-gonic/gin"
8
 	"github.com/gin-gonic/gin"
7
-	"net/http"
8
 )
9
 )
9
 
10
 
10
 const (
11
 const (

+ 2
- 1
middleware/auth/optional_auth.go View File

2
 
2
 
3
 import (
3
 import (
4
 	"fmt"
4
 	"fmt"
5
+	"net/http"
6
+
5
 	"github.com/dgrijalva/jwt-go"
7
 	"github.com/dgrijalva/jwt-go"
6
 	"github.com/gin-gonic/gin"
8
 	"github.com/gin-gonic/gin"
7
-	"net/http"
8
 )
9
 )
9
 
10
 
10
 func OptionalAuth(authKey string) gin.HandlerFunc {
11
 func OptionalAuth(authKey string) gin.HandlerFunc {

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

1
 package auth
1
 package auth
2
 
2
 
3
 import (
3
 import (
4
-	"github.com/go-redis/redis"
5
 	"time"
4
 	"time"
5
+
6
+	"github.com/go-redis/redis"
6
 )
7
 )
7
 
8
 
8
 type RedisSessionStore struct{ client *redis.Client }
9
 type RedisSessionStore struct{ client *redis.Client }