From 5396f5de9fbdf6c8c8803ff5dee54e7d3524dbf1 Mon Sep 17 00:00:00 2001 From: alessio Date: Sun, 31 Jul 2016 23:40:23 +0200 Subject: [PATCH] run function --- main.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 217e2fd..fe75650 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,8 @@ func main() { Name: "run", Usage: "Build and watch file changes", Action: func(p *cli.Context) error { - fmt.Printf("Hello %q", p.String("run")) + y := realize.New(p) + y.Watch() return nil }, Before: func(c *cli.Context) error { @@ -66,9 +67,9 @@ func main() { Flags: []cli.Flag{ &cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: "Sample App"}, &cli.StringFlag{Name: "main", Aliases: []string{"m"}, Value: "main.go"}, - &cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false}, - &cli.BoolFlag{Name: "run", Aliases: []string{"r"}, Value: true}, - &cli.BoolFlag{Name: "bin", Aliases: []string{"r"}, Value: true}, + &cli.BoolFlag{Name: "build", Value: false}, + &cli.BoolFlag{Name: "run", Value: true}, + &cli.BoolFlag{Name: "bin", Value: true}, }, Action: func(p *cli.Context) error { y := realize.New(p) @@ -87,9 +88,9 @@ func main() { Flags: []cli.Flag{ &cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: "Sample App"}, &cli.StringFlag{Name: "main", Aliases: []string{"m"}, Value: "main.go"}, - &cli.BoolFlag{Name: "build", Aliases: []string{"b"}, Value: false}, - &cli.BoolFlag{Name: "run", Aliases: []string{"r"}, Value: true}, - &cli.BoolFlag{Name: "bin", Aliases: []string{"r"}, Value: true}, + &cli.BoolFlag{Name: "build", Value: false}, + &cli.BoolFlag{Name: "run", Value: true}, + &cli.BoolFlag{Name: "bin", Value: true}, }, Action: func(p *cli.Context) error { y := realize.New(p)