From 24955fb0441a4f6e50a4cc034ff156a149c25068 Mon Sep 17 00:00:00 2001 From: Faissal Elamraoui Date: Thu, 28 Jul 2016 14:19:42 +0200 Subject: [PATCH] Fixed merge conflict --- .gitignore | 1 + run.go | 37 +++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index ffab5d0..a4c4e18 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Folders _obj _test +.idea # Architecture specific extensions/prefixes *.[568vq] diff --git a/run.go b/run.go index b9d40ed..db1ceed 100644 --- a/run.go +++ b/run.go @@ -20,6 +20,7 @@ import ( path "path/filepath" "runtime" "strings" + "fmt" ) var cmdRun = &Command{ @@ -32,18 +33,23 @@ it will recompile and restart the app after any modifications. `, } -var mainFiles ListOpts - -var downdoc docValue -var gendoc docValue - -// The flags list of the paths excluded from watching -var excludedPaths strFlags - -// Pass through to -tags arg of "go build" -var buildTags string - -var vendorWatch bool +var ( + mainFiles ListOpts + downdoc docValue + gendoc docValue + // The flags list of the paths excluded from watching + excludedPaths strFlags + // Pass through to -tags arg of "go build" + buildTags string + // Application path + currpath string + // Application name + appname string + // Channel to signal an Exit + exit chan bool + // Flag to watch the vendor folder + vendorWatch bool +) func init() { cmdRun.Run = runApp @@ -53,14 +59,9 @@ func init() { cmdRun.Flag.Var(&excludedPaths, "e", "Excluded paths[].") cmdRun.Flag.BoolVar(&vendorWatch, "vendor", false, "Watch vendor folder") 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 { ShowShortVersionBanner()