From 0e12c0ee4e7c8371133f39f5295b272609949f26 Mon Sep 17 00:00:00 2001 From: lash Date: Mon, 30 Dec 2024 19:35:45 +0000 Subject: [PATCH] Add prefix for dumper, format base dump key for pg --- devtools/store/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devtools/store/main.go b/devtools/store/main.go index 9262703..908e321 100644 --- a/devtools/store/main.go +++ b/devtools/store/main.go @@ -11,6 +11,7 @@ import ( "git.grassecon.net/urdt/ussd/initializers" "git.grassecon.net/urdt/ussd/internal/storage" "git.grassecon.net/urdt/ussd/debug" + "git.defalsify.org/vise.git/db" "git.defalsify.org/vise.git/logging" ) @@ -47,13 +48,14 @@ func main() { store, err := menuStorageService.GetUserdataDb(ctx) if err != nil { - fmt.Fprintf(os.Stderr, err.Error()) + fmt.Fprintf(os.Stderr, "get userdata db: %v\n", err.Error()) os.Exit(1) } + store.SetPrefix(db.DATATYPE_USERDATA) d, err := store.Dump(ctx, []byte(sessionId)) if err != nil { - fmt.Fprintf(os.Stderr, err.Error()) + fmt.Fprintf(os.Stderr, "store dump fail: %v\n", err.Error()) os.Exit(1) }