Skip to content

Commit

Permalink
chore: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayheaven committed Jan 29, 2024
1 parent 38e37bb commit afb38a2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
8 changes: 4 additions & 4 deletions cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
17 changes: 0 additions & 17 deletions cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
// }
// },
// }
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tools/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit afb38a2

Please sign in to comment.