diff --git a/cmd/africastalking/main.go b/cmd/africastalking/main.go index 053eab9..24812a1 100644 --- a/cmd/africastalking/main.go +++ b/cmd/africastalking/main.go @@ -12,17 +12,17 @@ import ( "syscall" "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" "git.defalsify.org/vise.git/logging" "git.defalsify.org/vise.git/resource" - "git.defalsify.org/vise.git/lang" "git.grassecon.net/urdt/ussd/config" "git.grassecon.net/urdt/ussd/initializers" + "git.grassecon.net/urdt/ussd/internal/args" "git.grassecon.net/urdt/ussd/internal/handlers" "git.grassecon.net/urdt/ussd/internal/http/at" "git.grassecon.net/urdt/ussd/internal/storage" "git.grassecon.net/urdt/ussd/remote" - "git.grassecon.net/urdt/ussd/internal/args" ) var ( @@ -59,7 +59,7 @@ func main() { flag.Var(&langs, "language", "add symbol resolution for language") flag.Parse() - if connStr != "" { + if connStr == "" { connStr = config.DbConn } connData, err := storage.ToConnData(connStr) diff --git a/cmd/async/main.go b/cmd/async/main.go index 0b9a233..27db453 100644 --- a/cmd/async/main.go +++ b/cmd/async/main.go @@ -10,16 +10,16 @@ import ( "syscall" "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" "git.defalsify.org/vise.git/logging" "git.defalsify.org/vise.git/resource" - "git.defalsify.org/vise.git/lang" "git.grassecon.net/urdt/ussd/config" "git.grassecon.net/urdt/ussd/initializers" + "git.grassecon.net/urdt/ussd/internal/args" "git.grassecon.net/urdt/ussd/internal/handlers" "git.grassecon.net/urdt/ussd/internal/storage" "git.grassecon.net/urdt/ussd/remote" - "git.grassecon.net/urdt/ussd/internal/args" ) var ( @@ -70,7 +70,7 @@ func main() { flag.Var(&langs, "language", "add symbol resolution for language") flag.Parse() - if connStr != "" { + if connStr == "" { connStr = config.DbConn } connData, err := storage.ToConnData(connStr) @@ -115,7 +115,6 @@ func main() { os.Exit(1) } - userdataStore, err := menuStorageService.GetUserdataDb(ctx) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) diff --git a/cmd/http/main.go b/cmd/http/main.go index 761ee72..6617ca5 100644 --- a/cmd/http/main.go +++ b/cmd/http/main.go @@ -12,17 +12,17 @@ import ( "syscall" "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" "git.defalsify.org/vise.git/logging" "git.defalsify.org/vise.git/resource" - "git.defalsify.org/vise.git/lang" "git.grassecon.net/urdt/ussd/config" "git.grassecon.net/urdt/ussd/initializers" + "git.grassecon.net/urdt/ussd/internal/args" "git.grassecon.net/urdt/ussd/internal/handlers" httpserver "git.grassecon.net/urdt/ussd/internal/http" "git.grassecon.net/urdt/ussd/internal/storage" "git.grassecon.net/urdt/ussd/remote" - "git.grassecon.net/urdt/ussd/internal/args" ) var ( @@ -58,7 +58,7 @@ func main() { flag.Var(&langs, "language", "add symbol resolution for language") flag.Parse() - if connStr != "" { + if connStr == "" { connStr = config.DbConn } connData, err := storage.ToConnData(connStr) @@ -92,7 +92,7 @@ func main() { } menuStorageService := storage.NewMenuStorageService(connData, resourceDir) - + rs, err := menuStorageService.GetResource(ctx) if err != nil { fmt.Fprintf(os.Stderr, err.Error()) diff --git a/cmd/main.go b/cmd/main.go index 8c06094..d2fe0ba 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -8,14 +8,14 @@ import ( "path" "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" "git.defalsify.org/vise.git/logging" "git.defalsify.org/vise.git/resource" - "git.defalsify.org/vise.git/lang" "git.grassecon.net/urdt/ussd/config" "git.grassecon.net/urdt/ussd/initializers" + "git.grassecon.net/urdt/ussd/internal/args" "git.grassecon.net/urdt/ussd/internal/handlers" "git.grassecon.net/urdt/ussd/internal/storage" - "git.grassecon.net/urdt/ussd/internal/args" "git.grassecon.net/urdt/ussd/remote" ) @@ -51,7 +51,7 @@ func main() { flag.Var(&langs, "language", "add symbol resolution for language") flag.Parse() - if connStr != "" { + if connStr == "" { connStr = config.DbConn } connData, err := storage.ToConnData(connStr) @@ -87,7 +87,7 @@ func main() { } menuStorageService := storage.NewMenuStorageService(connData, resourceDir) - + if gettextDir != "" { menuStorageService = menuStorageService.WithGettext(gettextDir, langs.Langs()) }