diff --git a/cmd/add.go b/cmd/add.go index c1e9284..b7438b9 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -20,12 +20,12 @@ func addSwagger() error { } var AddCmd = &cobra.Command{ - Use: "add [module name]", - Short: "Get the version of Go-Gin-Boilerplate", - Example: "ggb version", + Use: "add [component name]", + Short: "Add a component to the project", + Example: "ggb add swagger", Run: func(cmd *cobra.Command, args []string) { if len(args) < 1 { - fmt.Println("please enter module name") + fmt.Println("please enter component name") fmt.Println("See 'ggb help add'") return } diff --git a/cmd/new.go b/cmd/new.go index 0819e00..efbe0a5 100644 --- a/cmd/new.go +++ b/cmd/new.go @@ -50,20 +50,3 @@ var NewCmd = &cobra.Command{ }, } - -// var NewCmd = &cobra.Command{ -// Use: "new", -// Short: "Create new module or new project", -// Run: func(cmd *cobra.Command, args []string) { -// if len(args) < 1 { -// fmt.Println(errors.New("please enter name")) -// fmt.Println("See 'ggb help new'") -// return -// } -// if args[0] != "module" && args[0] != "project" { -// fmt.Println(errors.New("please enter available command")) -// fmt.Println("See 'ggb help new'") -// return -// } -// }, -// } diff --git a/main.go b/main.go index 4816beb..83eeb83 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( //go:embed deployments/* //go:embed githooks/* //go:embed internal/* +//go:embed scripts/* //go:embed tools/* //go:embed web/template/* //go:embed .air.toml .gitignore go.mod go.sum main.go Makefile diff --git a/tools/common.go b/tools/common.go index 1605ef8..f654be9 100644 --- a/tools/common.go +++ b/tools/common.go @@ -50,7 +50,6 @@ func CopyDirFromEmbedFS(src embed.FS, dest string) { if err != nil { return err } - // fmt.Println(path, filepath.Join(dest, path)) if !d.IsDir() && path != "." { fileContent, err := src.ReadFile(path) @@ -62,6 +61,8 @@ func CopyDirFromEmbedFS(src embed.FS, dest string) { if e != nil { panic(e) } + + fmt.Println("created: ", filepath.Join(dest, path)) } return nil