gorm_sqlite.go 260 B

1234567891011121314151617
  1. package config
  2. import (
  3. "path/filepath"
  4. )
  5. type Sqlite struct {
  6. GeneralDB `yaml:",inline" mapstructure:",squash"`
  7. }
  8. func (s *Sqlite) Dsn() string {
  9. return filepath.Join(s.Path, s.Dbname+".db")
  10. }
  11. func (s *Sqlite) GetLogMode() string {
  12. return s.LogMode
  13. }