Skip to content

Commit

Permalink
module resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
rh-mithu committed Dec 6, 2021
1 parent bcf514a commit d33a4f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ACCESS_SECRET=hello
RedisAddr=REDIS_DB=localhost:6379
RedisAddr=localhost:6379
GIN_PORT=8080
REFRESH_SECRET=hello
13 changes: 13 additions & 0 deletions config/init.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package config

import (
"github.com/HelpDeskPlatform/gin-jwt/db"
"log"
)

func InIt() {
SetEnvironment()
if err := db.NewDatabase(RedisAddr); err != nil {
log.Println(err)
}
}
7 changes: 0 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ func initEnv() {
}
}

func InIt() {
config.SetEnvironment()
if err := db.NewDatabase(config.RedisAddr); err != nil {
log.Println(err)
}
}

func init() {
initEnv()
}
Expand Down

0 comments on commit d33a4f6

Please sign in to comment.