Skip to content

Commit

Permalink
Merge pull request oxequa#215 from Quasilyte/quasilyte/unlambda
Browse files Browse the repository at this point in the history
remove redundant function literal wrapper
  • Loading branch information
asoseil committed Sep 18, 2018
2 parents e887c9d + c273d73 commit c046dff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
16 changes: 4 additions & 12 deletions realize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "no-config", Aliases: []string{"nc"}, Value: false, Usage: "Ignore existing config and doesn't create a new one"},
},
Action: func(c *cli.Context) error {
return start(c)
},
Action: start,
},
{
Name: "add",
Expand All @@ -61,18 +59,14 @@ func main() {
&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"},
},
Action: func(c *cli.Context) error {
return add(c)
},
Action: add,
},
{
Name: "init",
Category: "Configuration",
Aliases: []string{"i"},
Description: "Make a new config file step by step.",
Action: func(c *cli.Context) error {
return setup(c)
},
Action: setup,
},
{
Name: "remove",
Expand All @@ -82,9 +76,7 @@ func main() {
Flags: []cli.Flag{
&cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: ""},
},
Action: func(c *cli.Context) error {
return remove(c)
},
Action: remove,
},
{
Name: "clean",
Expand Down
4 changes: 1 addition & 3 deletions realize/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,7 @@ func (p *Project) run(path string, stream chan Response, stop <-chan bool) (err
r.Err = err
stream <- r
} else {
isErrorText = func(t string) bool {
return errRegexp.MatchString(t)
}
isErrorText = errRegexp.MatchString
}

// add additional arguments
Expand Down

0 comments on commit c046dff

Please sign in to comment.