refactor: 引入tailwind css & 后端部分非公共包位置调整

This commit is contained in:
meilin.huang
2025-04-18 22:07:37 +08:00
parent 585cbbed23
commit abd2b4bac0
168 changed files with 763 additions and 793 deletions

View File

@@ -0,0 +1,22 @@
package config
import "mayfly-go/pkg/logx"
type Sqlite struct {
Path string `mapstructure:"path" json:"path" yaml:"path"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
}
func (m *Sqlite) Default() {
if m.Path == "" {
m.Path = "./mayfly-go.sqlite"
logx.Warnf("[使用mysql可忽略]未配置sqlite.path, 默认值: %s", m.Path)
}
if m.MaxIdleConns == 0 {
m.MaxIdleConns = 5
}
if m.MaxOpenConns == 0 {
m.MaxOpenConns = m.MaxIdleConns
}
}