Skip to content

Commit 2575397

Browse files
committed
fix: Fix new command with branch
1 parent ee54662 commit 2575397

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

cmd/new.go

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,26 @@ func New() *cli.Command {
2525
Required: true,
2626
},
2727
&cli.StringFlag{
28-
Name: "desc",
29-
Usage: "The project description",
30-
Required: false,
28+
Name: "desc",
29+
Usage: "The project description",
3130
},
3231
&cli.StringFlag{
33-
Name: "version",
34-
Usage: "The project version (default: 1.0.0)",
35-
Required: false,
32+
Name: "version",
33+
Usage: "The project version (default: 1.0.0)",
3634
},
3735
&cli.StringFlag{
38-
Name: "pkg",
39-
Usage: "The project package name (default: project name)",
40-
Required: false,
36+
Name: "pkg",
37+
Usage: "The project package name (default: project name)",
4138
},
4239
&cli.StringFlag{
43-
Name: "git-url",
44-
Usage: "Use git repository to initialize the project (default: https://github.com/LyricTian/gin-admin.git)",
45-
Required: false,
40+
Name: "git-url",
41+
Usage: "Use git repository to initialize the project (default: https://github.com/LyricTian/gin-admin.git)",
42+
Value: "https://github.com/LyricTian/gin-admin.git",
4643
},
4744
&cli.StringFlag{
48-
Name: "git-branch",
49-
Usage: "Use git branch to initialize the project (default: master)",
50-
Required: false,
45+
Name: "git-branch",
46+
Usage: "Use git branch to initialize the project (default: main)",
47+
Value: "main",
5148
},
5249
},
5350
Action: func(c *cli.Context) error {

0 commit comments

Comments
 (0)