update project path
This commit is contained in:
1 parent
26acdbd0d1
commit
e027e6a259
76 files changed
+2562
-106
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
type RedisConn struct {
|
||||
Addr string
|
||||
Password string
|
||||
DB int
|
||||
}
|
||||
|
||||
func InitRedisConn(cfg *viper.Viper) *RedisConn {
|
||||
return &RedisConn{
|
||||
Addr: cfg.GetString("addr"),
|
||||
Password: cfg.GetString("password"),
|
||||
DB: cfg.GetInt("db"),
|
||||
}
|
||||
}
|
||||
|
||||
var RedisConnConfig = new(RedisConn)
|
||||
Reference in new issue
Block a user