未验证 提交 b94bc5f0 编写于 作者: Z zhengtianbao 提交者: GitHub

use filepath join instead of hardcode separator (#1479)

上级 1cc3d917
package config package config
import (
"path/filepath"
)
type Sqlite struct { type Sqlite struct {
GeneralDB `yaml:",inline" mapstructure:",squash"` GeneralDB `yaml:",inline" mapstructure:",squash"`
} }
func (s *Sqlite) Dsn() string { func (s *Sqlite) Dsn() string {
return s.Path + "\\" + s.Dbname + ".db" return filepath.Join(s.Path, s.Dbname+".db")
} }
func (s *Sqlite) GetLogMode() string { func (s *Sqlite) GetLogMode() string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册