From c1b8d12c85448171d740956cfe90e6a088b2f176 Mon Sep 17 00:00:00 2001 From: Mukesh Kumar Chaudhary Date: Sun, 3 Dec 2023 13:26:15 +0545 Subject: [PATCH] fix: information after module generation --- pkg/constant/constant.go | 1 + pkg/utility/print.go | 2 +- templates/wesionary/module/route.tmpl | 2 +- templates/wesionary/project/domain/features/hello/route.tmpl | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/constant/constant.go b/pkg/constant/constant.go index c3686a1..0ae7333 100644 --- a/pkg/constant/constant.go +++ b/pkg/constant/constant.go @@ -17,4 +17,5 @@ const ( ProjectDescription = "Project Description" GoVersion = "Go Version" Directory = "Project Directory" + ModuleName = "Module Name" ) diff --git a/pkg/utility/print.go b/pkg/utility/print.go index bcc0963..2e5fb56 100644 --- a/pkg/utility/print.go +++ b/pkg/utility/print.go @@ -45,7 +45,7 @@ func PrintColorizeModuleDetail(data model.ModuleData) { `) color.Greenln("\tThe information you have provided:\n") - color.Cyanf("\t%-20s💻: %-15s\n", constant.ProjectName, data.ProjectName) + color.Cyanf("\t%-20s💻: %-15s\n", constant.ModuleName, data.PackageName) color.Cyanf("\t%-20s📂: %-15s\n", constant.ProjectModuleName, data.ProjectModuleName) color.Cyanf("\t%-20s🆚: %-15s\n", constant.GoVersion, data.GoVersion) PrintFinalStepAfterModuleInitialization(data) diff --git a/templates/wesionary/module/route.tmpl b/templates/wesionary/module/route.tmpl index e6b4f7f..2ea0716 100644 --- a/templates/wesionary/module/route.tmpl +++ b/templates/wesionary/module/route.tmpl @@ -19,5 +19,5 @@ func New{{.ModuleName}}Route(router *infrastructure.Router, controller *{{.Modul } func (r *{{.ModuleName}}Route) RegisterHelloRoutes() { - r.groupRouter.GET("/", r.controller.HandleRoot) + r.groupRouter.GET("", r.controller.HandleRoot) } diff --git a/templates/wesionary/project/domain/features/hello/route.tmpl b/templates/wesionary/project/domain/features/hello/route.tmpl index 2ad4b04..8861797 100644 --- a/templates/wesionary/project/domain/features/hello/route.tmpl +++ b/templates/wesionary/project/domain/features/hello/route.tmpl @@ -19,5 +19,5 @@ func NewHelloRoute(router *infrastructure.Router, controller *HelloController) * } func (r *HelloRoute) RegisterHelloRoutes() { - r.groupRouter.GET("/", r.controller.HandleRoot) + r.groupRouter.GET("", r.controller.HandleRoot) }