PostgreSQL compatibility #5
|
@ -23,11 +23,11 @@ import (
|
||||||
|
|
||||||
"github.com/go-enry/go-enry/v2"
|
"github.com/go-enry/go-enry/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
_ "github.com/lib/pq"
|
||||||
"github.com/microcosm-cc/bluemonday"
|
"github.com/microcosm-cc/bluemonday"
|
||||||
"github.com/niklasfasching/go-org/org"
|
"github.com/niklasfasching/go-org/org"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
_ "modernc.org/sqlite"
|
_ "modernc.org/sqlite"
|
||||||
_ "github.com/lib/pq"
|
|
||||||
"tailscale.com/client/tailscale"
|
"tailscale.com/client/tailscale"
|
||||||
"tailscale.com/client/tailscale/apitype"
|
"tailscale.com/client/tailscale/apitype"
|
||||||
"tailscale.com/ipn"
|
"tailscale.com/ipn"
|
||||||
|
@ -826,7 +826,7 @@ func (mch MixedCriticalityHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
|
||||||
|
|
||||||
func openDB(dir string, databaseUrl string) (*sql.DB, error) {
|
func openDB(dir string, databaseUrl string) (*sql.DB, error) {
|
||||||
dbtype := "sqlite"
|
dbtype := "sqlite"
|
||||||
dbpath := "file:"+filepath.Join(dir, "data.db")
|
dbpath := "file:" + filepath.Join(dir, "data.db")
|
||||||
if databaseUrl != "" {
|
if databaseUrl != "" {
|
||||||
dbtype = "postgres"
|
dbtype = "postgres"
|
||||||
dbpath = databaseUrl
|
dbpath = databaseUrl
|
||||||
|
|
Loading…
Reference in a new issue