feat: use goreleaser
Some checks failed
Markdown linter / markdown-lint (push) Successful in 13s
Golang Tests / unittest (push) Successful in 33s
Release / release (push) Failing after 4m54s
Release / sync-to-hub-docker-io (push) Has been skipped

This commit is contained in:
2025-05-31 21:18:20 +02:00
parent c9065425b1
commit 4c7ce56f1b
16 changed files with 400 additions and 838 deletions

View File

@ -25,7 +25,7 @@ func Wait(databaseURL *url.URL, period time.Duration, timeout time.Duration) err
return err
}
}
defer sqlDB.Close()
defer func() { _ = sqlDB.Close() }()
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
@ -63,12 +63,15 @@ LOOP:
return nil
case "postgres":
row := sqlDB.QueryRowContext(queryCtx, "SELECT 1 AS ROW")
if row.Err() != nil {
err := row.Err()
switch {
case err == nil:
return nil
default:
fmt.Fprintf(os.Stderr, "%s: %s\n", time.Now().String(), err.Error())
ticker.Reset(period)
continue LOOP
}
return nil
}
}
}