框架慢慢修改
This commit is contained in:
@@ -4,8 +4,9 @@ Host = 127.0.0.1
|
||||
Port = 3306
|
||||
User = root
|
||||
Password = root
|
||||
DB = blog
|
||||
DBName = blog
|
||||
Charset = utf8mb4
|
||||
Prefix = gin_
|
||||
;Prefix = gin_
|
||||
|
||||
[jwt]
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/go-ini/ini"
|
||||
"time"
|
||||
|
||||
"github.com/go-ini/ini"
|
||||
)
|
||||
|
||||
type SqlDataBase struct {
|
||||
@@ -17,7 +18,7 @@ type SqlDataBase struct {
|
||||
Port string
|
||||
User string
|
||||
Password string
|
||||
DB string
|
||||
DBName string
|
||||
Charset string
|
||||
Prefix string
|
||||
}
|
||||
@@ -29,12 +30,12 @@ type Jwt struct {
|
||||
type Project struct {
|
||||
StaticUrlMapPath string
|
||||
TemplateGlob string
|
||||
MediaFilePath string
|
||||
MediaFilePath string
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Port string
|
||||
ReadTimeout time.Duration
|
||||
Port string
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
}
|
||||
|
||||
@@ -42,7 +43,7 @@ var (
|
||||
DataBase = &SqlDataBase{}
|
||||
JwtSecretKey = &Jwt{}
|
||||
ProjectCfg = &Project{}
|
||||
HttpServer = &Server{}
|
||||
HttpServer = &Server{}
|
||||
)
|
||||
|
||||
func SetUp() {
|
||||
|
||||
Reference in New Issue
Block a user