[FIX]the flag name, remove redundant hyphen (#1118)

pull/1122/head
Scaat Feng 3 years ago committed by GitHub
parent 01409cfb78
commit c7c91edeb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/kratos/internal/project/project.go
  2. 2
      cmd/kratos/internal/proto/server/server.go

@ -25,8 +25,8 @@ func init() {
if repoURL = os.Getenv("KRATOS_LAYOUT_REPO"); repoURL == "" { if repoURL = os.Getenv("KRATOS_LAYOUT_REPO"); repoURL == "" {
repoURL = "https://github.com/go-kratos/kratos-layout.git" repoURL = "https://github.com/go-kratos/kratos-layout.git"
} }
CmdNew.Flags().StringVarP(&repoURL, "-repo-url", "r", repoURL, "layout repo") CmdNew.Flags().StringVarP(&repoURL, "repo-url", "r", repoURL, "layout repo")
CmdNew.Flags().StringVarP(&branch, "-branch", "b", branch, "repo branch") CmdNew.Flags().StringVarP(&branch, "branch", "b", branch, "repo branch")
} }
func run(cmd *cobra.Command, args []string) { func run(cmd *cobra.Command, args []string) {

@ -22,7 +22,7 @@ var CmdServer = &cobra.Command{
var targetDir string var targetDir string
func init() { func init() {
CmdServer.Flags().StringVarP(&targetDir, "-target-dir", "t", "internal/service", "generate target directory") CmdServer.Flags().StringVarP(&targetDir, "target-dir", "t", "internal/service", "generate target directory")
} }
func run(cmd *cobra.Command, args []string) { func run(cmd *cobra.Command, args []string) {

Loading…
Cancel
Save