From 144068eaf29f24bf6f63e55278efdd5371c14bd6 Mon Sep 17 00:00:00 2001 From: Jan Rada <31016933+ZelvaMan@users.noreply.github.com> Date: Sat, 20 Apr 2024 23:10:38 +0200 Subject: [PATCH] refactoring --- cmd/generate.go | 9 ++++++++- cmd/{getRoutines.go => routines.go} | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) rename cmd/{getRoutines.go => routines.go} (96%) diff --git a/cmd/generate.go b/cmd/generate.go index 925a47e..1bdddad 100755 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -19,7 +19,14 @@ const ( var generateCmd = &cobra.Command{ Use: "generate", Short: "Generate code", - Long: "Generate code for calling database stored procedures", + Long: ` + Generate code for calling stored procedures. + Procedures can be loaded from database or from provided file. + Output folder and templates are defined in configuration file. + + For more information, see github.com/keenmate/db-gen + + `, Run: func(cmd *cobra.Command, args []string) { common.BindBoolFlag(cmd, keyDebug) common.BindBoolFlag(cmd, keyUseRoutinesFile) diff --git a/cmd/getRoutines.go b/cmd/routines.go similarity index 96% rename from cmd/getRoutines.go rename to cmd/routines.go index a7cabb4..b62c4cc 100755 --- a/cmd/getRoutines.go +++ b/cmd/routines.go @@ -12,7 +12,7 @@ import ( var getRoutinesCmd = &cobra.Command{ Use: "routines [out]", Short: "Get routines", - Long: "Get routines from database to generate later", + Long: "Get routines from database and save them to file to generate later", Run: func(cmd *cobra.Command, args []string) { common.BindBoolFlag(cmd, keyDebug) common.BindBoolFlag(cmd, keyUseRoutinesFile)