docs: updated readme
Some checks failed
Gitea Build Check / Build (push) Has been cancelled
Gitea Build Check / Build (pull_request) Failing after 28s

This commit is contained in:
SoXX 2024-07-19 14:54:30 +02:00
parent 91da9b7035
commit 652b2ea716

View File

@ -33,24 +33,22 @@ package main
import ( import (
"context" "context"
"fmt" "log"
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database" "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models" "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
) )
func main() { func main() {
var err error
dbDebug := false
ctx := context.Background() ctx := context.Background()
cfg := models.DatabaseConfig{}
pgClient := database.NewPostgresqlConnection(dbDebug) pgClient := database.NewPostgresqlConnection()
err = pgClient.Connect(ctx, "your-endpoint", "your-username", "your-password", "anthrove", 5432, "disable", "Europe/Berlin") err := pgClient.Connect(ctx, cfg)
if err != nil { if err != nil {
fmt.Println(err) log.Panic(err)
return
} }
// further usage of the client...
} }
``` ```