完善
This commit is contained in:
parent
a2c593885a
commit
14948929b1
2
main.go
2
main.go
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
err := vars.InitDbConfig()
|
||||
err := vars.InitConfig()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ type Mysql struct {
|
|||
Pool Pool `yaml:"pool"`
|
||||
}
|
||||
|
||||
func InitDbConfig() error {
|
||||
func InitConfig() error {
|
||||
file, err := ioutil.ReadFile("config.yaml")
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue
Block a user