Skip to content

Commit

Permalink
refactor: 修改配置Model名
Browse files Browse the repository at this point in the history
  • Loading branch information
OrenZhang committed Feb 7, 2024
1 parent b7afcbb commit 7d617db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/src/configs/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func InitConfig() {
TLSCert: utils.GetEnv("TLS_CERT", ""),
TLSKey: utils.GetEnv("TLS_KEY", ""),
},
ConfigModel: ConfigModel{
sessionConfigModel: sessionConfigModel{
SessionCookieName: buildSessionCookieName(),
SessionCookieAge: utils.StrToInt(utils.GetEnv("SESSION_COOKIE_AGE", strconv.Itoa(60*60*24*7))),
SessionCookiePath: utils.GetEnv("SESSION_COOKIE_PATH", "/"),
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_name}}/src/configs/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type configModel struct {
traceConfigModel
corsConfigModel
dbConfigModel
ConfigModel
sessionConfigModel
redisConfigModel
}

Expand Down Expand Up @@ -43,7 +43,7 @@ type dbConfigModel struct {
DBSlowThreshold time.Duration
}

type ConfigModel struct {
type sessionConfigModel struct {
SessionCookieName string
SessionCookieAge int
SessionCookiePath string
Expand Down

0 comments on commit 7d617db

Please sign in to comment.