mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-02 04:07:33 +08:00
U refactor
This commit is contained in:
parent
a8d0df30c3
commit
e44f948376
@ -46,13 +46,11 @@ func init() {
|
||||
flag.StringVar(&s, "s", "", "stop")
|
||||
flag.BoolVar(&help, "help", false, "list available subcommands and some concept guides")
|
||||
flag.BoolVar(&v, "version", false, "show goploy version")
|
||||
// 改变默认的 Usage
|
||||
flag.Usage = usage
|
||||
}
|
||||
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "Options:\n")
|
||||
flag.PrintDefaults()
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(os.Stderr, "Options:\n")
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
go checkUpdate()
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -90,8 +88,6 @@ func main() {
|
||||
println("Listen: " + config.Toml.Web.Port)
|
||||
println("Running...")
|
||||
task.Init()
|
||||
go checkUpdate()
|
||||
// server
|
||||
srv := server.Server{
|
||||
Server: http.Server{
|
||||
Addr: ":" + config.Toml.Web.Port,
|
||||
|
Loading…
Reference in New Issue
Block a user