From 652b2ea7166ae3617f8d6d46133a97687e73c832 Mon Sep 17 00:00:00 2001 From: SoXX Date: Fri, 19 Jul 2024 14:54:30 +0200 Subject: [PATCH] docs: updated readme --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a0828e0..19c63fb 100644 --- a/README.md +++ b/README.md @@ -33,24 +33,22 @@ package main import ( "context" - "fmt" + "log" "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database" "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models" ) func main() { - var err error - dbDebug := false - ctx := context.Background() - - pgClient := database.NewPostgresqlConnection(dbDebug) - err = pgClient.Connect(ctx, "your-endpoint", "your-username", "your-password", "anthrove", 5432, "disable", "Europe/Berlin") + ctx := context.Background() + cfg := models.DatabaseConfig{} + + pgClient := database.NewPostgresqlConnection() + err := pgClient.Connect(ctx, cfg) if err != nil { - fmt.Println(err) - return + log.Panic(err) } - // further usage of the client... + } ```