框架慢慢修改

This commit is contained in:
zhangchao
2024-07-04 19:15:44 +08:00
parent d79e6bdaba
commit 82eadb8921
13 changed files with 152 additions and 96 deletions

View File

@@ -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]

View File

@@ -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() {