More fixes, this time for cmd stuff
Some checks failed
/ test (push) Has been cancelled

This commit is contained in:
Melody Becker 2025-03-29 17:51:56 +01:00
parent e282f124c7
commit 69927c76ff
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
3 changed files with 26 additions and 19 deletions

View file

@ -10,7 +10,7 @@ import (
"git.mstar.dev/mstar/linstrom/config"
"git.mstar.dev/mstar/linstrom/shared"
"git.mstar.dev/mstar/linstrom/storage-new"
storage "git.mstar.dev/mstar/linstrom/storage-new"
)
func main() {

View file

@ -18,6 +18,14 @@ import (
"git.mstar.dev/mstar/linstrom/storage-new/models"
)
// "git.mstar.dev/mstar/linstrom/config"
// "context"
// "time"
// postgresContainer "github.com/testcontainers/testcontainers-go/modules/postgres"
// "github.com/testcontainers/testcontainers-go"
// "github.com/testcontainers/testcontainers-go/wait"
const (
dbName = "linstrom"
dbUser = "linstrom"
@ -28,6 +36,7 @@ func main() {
other.SetupFlags()
flag.Parse()
other.ConfigureLogging(nil)
// config.ReadAndWriteToGlobal(*shared.FlagConfigFile)
// Set up a temporary postgres container for gorm-gen to do its thing
log.Info().Msg("Starting temporary postgres container")
@ -55,6 +64,7 @@ func main() {
log.Info().Msg("Temporary postgres container stopped")
}()
db, err := gorm.Open(
// postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
postgres.Open(pgContainer.MustConnectionString(context.Background())),
&gorm.Config{
PrepareStmt: false,