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