Tweaked project structure (#88)

This commit is contained in:
Thomas Miceli
2023-09-03 00:30:57 +02:00
committed by GitHub
parent 25316d7bf2
commit a7b346d8df
25 changed files with 122 additions and 116 deletions

View File

@ -5,8 +5,8 @@ import (
"fmt"
"github.com/rs/zerolog/log"
"github.com/thomiceli/opengist/internal/config"
"github.com/thomiceli/opengist/internal/db"
"github.com/thomiceli/opengist/internal/git"
"github.com/thomiceli/opengist/internal/models"
"github.com/thomiceli/opengist/internal/ssh"
"github.com/thomiceli/opengist/internal/web"
"os"
@ -51,11 +51,9 @@ func initialize() {
}
log.Info().Msg("Database file: " + filepath.Join(homePath, config.C.DBFilename))
if err := models.Setup(filepath.Join(homePath, config.C.DBFilename)); err != nil {
if err := db.Setup(filepath.Join(homePath, config.C.DBFilename)); err != nil {
log.Fatal().Err(err).Msg("Failed to initialize database")
}
web.EmbedFS = dirFS
}
func main() {