mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
grouped variable declarations
This commit is contained in:
parent
4be4a20df4
commit
4f3ed96523
30
run.go
30
run.go
@ -15,12 +15,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
path "path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var cmdRun = &Command{
|
||||
@ -33,16 +33,21 @@ it will recompile and restart the app after any modifications.
|
||||
`,
|
||||
}
|
||||
|
||||
var mainFiles ListOpts
|
||||
|
||||
var downdoc docValue
|
||||
var gendoc docValue
|
||||
|
||||
var (
|
||||
mainFiles ListOpts
|
||||
downdoc docValue
|
||||
gendoc docValue
|
||||
// The flags list of the paths excluded from watching
|
||||
var excludedPaths strFlags
|
||||
|
||||
excludedPaths strFlags
|
||||
// Pass through to -tags arg of "go build"
|
||||
var buildTags string
|
||||
buildTags string
|
||||
// Application path
|
||||
currpath string
|
||||
// Application name
|
||||
appname string
|
||||
// Channel to signal an Exit
|
||||
exit chan bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
cmdRun.Run = runApp
|
||||
@ -51,13 +56,8 @@ func init() {
|
||||
cmdRun.Flag.Var(&downdoc, "downdoc", "Auto download Swagger file when does not exist")
|
||||
cmdRun.Flag.Var(&excludedPaths, "e", "Excluded paths[].")
|
||||
cmdRun.Flag.StringVar(&buildTags, "tags", "", "Build tags (https://golang.org/pkg/go/build/)")
|
||||
}
|
||||
|
||||
var (
|
||||
currpath = ""
|
||||
appname = ""
|
||||
exit = make(chan bool)
|
||||
)
|
||||
}
|
||||
|
||||
func runApp(cmd *Command, args []string) int {
|
||||
ShowShortVersionBanner()
|
||||
|
Loading…
Reference in New Issue
Block a user