chore: modify default to main for creating a project (#162)

This commit is contained in:
Richard
2024-11-22 08:52:24 +08:00
committed by GitHub
parent e847aa4d6e
commit 7ed3b22d20
3 changed files with 6 additions and 10 deletions

View File

@@ -82,13 +82,8 @@ go get github.com/go-eagle/eagle/cmd/eagle
## Quick Start
```bash
# only gen a server with http
eagle new eagle-demo
# or
eagle new github.com/foo/eagle-demo
# gen a server with http and gRPC
eagle new -b=main eagle-demo
eagle new eagle-demo
# or
eagle new github.com/foo/eagle-demo
@@ -116,6 +111,7 @@ make run
## Discussion
- Issue: https://github.com/go-eagle/eagle/issues
- Discord: https://discord.com/channels/968369660900814869
## Microservice Roadmap

View File

@@ -30,13 +30,13 @@ func init() {
repoURL = "https://github.com/go-eagle/eagle-layout.git"
}
// default http, only include http server
branch = "http"
// default main, you can change to other branch, eg: http
branch = "main"
// default timeout
timeout = "60s"
CmdNew.Flags().StringVarP(&repoURL, "repo-url", "r", repoURL, "layout repo")
CmdNew.Flags().StringVarP(&branch, "branch", "b", branch, "default is http server, empty is http and gRPC")
CmdNew.Flags().StringVarP(&branch, "branch", "b", branch, "default is main branch, including http and gRPC")
CmdNew.Flags().StringVarP(&timeout, "timeout", "t", timeout, "request timeout time")
}

View File

@@ -19,7 +19,7 @@ import (
var (
// Version is the version of the compiled software.
Version = "v1.0.0"
Version = "v1.0.1"
rootCmd = &cobra.Command{
Use: "eagle",