fixed imports
This commit is contained in:
parent
8c640f7b6b
commit
4df52360e8
2 changed files with 3 additions and 2 deletions
3
main.go
3
main.go
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Bronku/iroon/server"
|
"github.com/Bronku/iroon/server"
|
||||||
|
"github.com/Bronku/iroon/store"
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// load database
|
// load database
|
||||||
db, err := store.loadStore(conf.Database.File)
|
db, err := store.LoadStore(conf.Database.File)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func loadStore(dsn string) (*gorm.DB, error) {
|
func LoadStore(dsn string) (*gorm.DB, error) {
|
||||||
newLogger := logger.New(
|
newLogger := logger.New(
|
||||||
log.New(os.Stdout, "\r\n", log.LstdFlags),
|
log.New(os.Stdout, "\r\n", log.LstdFlags),
|
||||||
logger.Config{
|
logger.Config{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue