Merge pull request #215 from Quasilyte/quasilyte/unlambda

remove redundant function literal wrapper
This commit is contained in:
Alessio Pracchia 2018-09-18 11:22:56 +02:00 committed by GitHub
commit c046dffbb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 15 deletions

View File

@ -42,9 +42,7 @@ func main() {
&cli.BoolFlag{Name: "legacy", Aliases: []string{"l"}, Value: false, Usage: "Legacy watch by polling instead fsnotify"}, &cli.BoolFlag{Name: "legacy", Aliases: []string{"l"}, Value: false, Usage: "Legacy watch by polling instead fsnotify"},
&cli.BoolFlag{Name: "no-config", Aliases: []string{"nc"}, Value: false, Usage: "Ignore existing config and doesn't create a new one"}, &cli.BoolFlag{Name: "no-config", Aliases: []string{"nc"}, Value: false, Usage: "Ignore existing config and doesn't create a new one"},
}, },
Action: func(c *cli.Context) error { Action: start,
return start(c)
},
}, },
{ {
Name: "add", Name: "add",
@ -61,18 +59,14 @@ func main() {
&cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false, Usage: "Enable go build"}, &cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false, Usage: "Enable go build"},
&cli.BoolFlag{Name: "run", Aliases: []string{"nr"}, Value: false, Usage: "Enable go run"}, &cli.BoolFlag{Name: "run", Aliases: []string{"nr"}, Value: false, Usage: "Enable go run"},
}, },
Action: func(c *cli.Context) error { Action: add,
return add(c)
},
}, },
{ {
Name: "init", Name: "init",
Category: "Configuration", Category: "Configuration",
Aliases: []string{"i"}, Aliases: []string{"i"},
Description: "Make a new config file step by step.", Description: "Make a new config file step by step.",
Action: func(c *cli.Context) error { Action: setup,
return setup(c)
},
}, },
{ {
Name: "remove", Name: "remove",
@ -82,9 +76,7 @@ func main() {
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: ""}, &cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: ""},
}, },
Action: func(c *cli.Context) error { Action: remove,
return remove(c)
},
}, },
{ {
Name: "clean", Name: "clean",

View File

@ -592,9 +592,7 @@ func (p *Project) run(path string, stream chan Response, stop <-chan bool) (err
r.Err = err r.Err = err
stream <- r stream <- r
} else { } else {
isErrorText = func(t string) bool { isErrorText = errRegexp.MatchString
return errRegexp.MatchString(t)
}
} }
// add additional arguments // add additional arguments