Skip to content

Commit

Permalink
Support multiple configuration files.
Browse files Browse the repository at this point in the history
  • Loading branch information
8treenet committed Dec 23, 2022
1 parent e0144d3 commit 6e4d80e
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example/base/server/conf/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[db]
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local"
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local"
max_open_conns = 16
max_idle_conns = 8
conn_max_life_time = 300
Expand Down
2 changes: 1 addition & 1 deletion example/base/server/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
db:
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local
max_open_conns: 16
max_idle_conns: 8
conn_max_life_time: 300
Expand Down
2 changes: 1 addition & 1 deletion example/fshop/server/conf/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[db]
addr = "root:root7944@tcp(127.0.0.1:3306)/fshop?charset=utf8&parseTime=True&loc=Local"
addr = "root:root7944@tcp(127.0.0.1:3306)/fshop?charset=utf8mb4&parseTime=True&loc=Local"
max_open_conns = 16
max_idle_conns = 8
conn_max_life_time = 300
Expand Down
2 changes: 1 addition & 1 deletion example/fshop/server/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
db:
addr: root:root7944@tcp(127.0.0.1:3306)/fshop?charset=utf8&parseTime=True&loc=Local
addr: root:root7944@tcp(127.0.0.1:3306)/fshop?charset=utf8mb4&parseTime=True&loc=Local
max_open_conns: 16
max_idle_conns: 8
conn_max_life_time: 300
Expand Down
2 changes: 1 addition & 1 deletion example/http2/server/conf/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[db]
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local"
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local"
max_open_conns = 16
max_idle_conns = 8
conn_max_life_time = 300
Expand Down
2 changes: 1 addition & 1 deletion example/http2/server/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
db:
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local
max_open_conns: 16
max_idle_conns: 8
conn_max_life_time: 300
Expand Down
2 changes: 1 addition & 1 deletion example/infra-example/server/conf/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[db]
addr = "root:root7944@tcp(127.0.0.1:3306)/freedom?charset=utf8&parseTime=True&loc=Local"
addr = "root:root7944@tcp(127.0.0.1:3306)/freedom?charset=utf8mb4&parseTime=True&loc=Local"
max_open_conns = 16
max_idle_conns = 8
conn_max_life_time = 300
Expand Down
2 changes: 1 addition & 1 deletion example/infra-example/server/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
db:
addr: root:root7944@tcp(127.0.0.1:3306)/freedom?charset=utf8&parseTime=True&loc=Local
addr: root:root7944@tcp(127.0.0.1:3306)/freedom?charset=utf8mb4&parseTime=True&loc=Local
max_open_conns: 16
max_idle_conns: 8
conn_max_life_time: 300
Expand Down
2 changes: 1 addition & 1 deletion freedom/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

const (
versionNum = "v1.9.0"
versionNum = "v1.9.1"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions freedom/template/project/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func init() {

func tomlConf() string {
return `[db]
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local"
addr = "root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local"
max_open_conns = 16
max_idle_conns = 8
conn_max_life_time = 300
Expand Down Expand Up @@ -51,7 +51,7 @@ shutdown_second = 3

func yamlConf() string {
return `db:
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8&parseTime=True&loc=Local
addr: root:123123@tcp(127.0.0.1:3306)/xxxx?charset=utf8mb4&parseTime=True&loc=Local
max_open_conns: 16
max_idle_conns: 8
conn_max_life_time: 300
Expand Down

0 comments on commit 6e4d80e

Please sign in to comment.