From dc1674ec551c9ba24a16886d7076a3a91eefdd64 Mon Sep 17 00:00:00 2001 From: lash Date: Sat, 4 Jan 2025 08:40:43 +0000 Subject: [PATCH] WIP add connection string parser --- internal/storage/parse.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 internal/storage/parse.go diff --git a/internal/storage/parse.go b/internal/storage/parse.go new file mode 100644 index 0000000..0745a72 --- /dev/null +++ b/internal/storage/parse.go @@ -0,0 +1,21 @@ +package storage + +const ( + DBTYPE_MEM = iota + DBTYPE_GDBM + DBTYPE_POSTGRES +) + +type connData struct { + typ int + str string +} + +func toConnData(s string) connData { + var o connData + + if s == "" { + return o + } + return o +}