You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
307 B
18 lines
307 B
package hasaki_{{.app_name}}
|
|
|
|
import "git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb"
|
|
|
|
func InitDb(config interface{}) (err error) {
|
|
if config == nil {
|
|
err = hskdb.XormSync2()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else { //分库
|
|
err = hskdb.XormSync2(config)
|
|
if err != nil {
|
|
return
|
|
}
|
|
}
|
|
return
|
|
}
|