From d9635f84a762d089dd10c4842776dbbc213f44aa Mon Sep 17 00:00:00 2001 From: alessio Date: Tue, 23 Aug 2016 22:21:15 +0200 Subject: [PATCH] govet fixed, goreport --- README.md | 1 + realize/watcher.go | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cf72f81..db982b6 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![AUR](https://img.shields.io/aur/license/yaourt.svg?maxAge=2592000?style=flat-square)](https://raw.githubusercontent.com/tockins/realize/v1/LICENSE) [![](https://img.shields.io/badge/realize-examples-yellow.svg)](https://github.com/tockins/realize-examples) [![Join the chat at https://gitter.im/tockins/realize](https://badges.gitter.im/tockins/realize.svg)](https://gitter.im/tockins/realize?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Go Report Card](https://goreportcard.com/badge/github.com/tockins/realize)](https://goreportcard.com/report/github.com/tockins/realize) ![Logo](http://i.imgur.com/8nr2s1b.jpg) diff --git a/realize/watcher.go b/realize/watcher.go index 614e2b1..48bbff8 100644 --- a/realize/watcher.go +++ b/realize/watcher.go @@ -31,7 +31,6 @@ func (h *Config) Watch() error { // loop projects wg.Add(len(h.Projects)) for k := range h.Projects { - h.Projects[k].Path = h.Projects[k].Path go h.Projects[k].watching() } wg.Wait() @@ -122,7 +121,8 @@ func (p *Project) watching() { } } - fmt.Println(Red("Watching: "), pname(p.Name, 1), Magenta(files), "files", Magenta(folders), "folders \n") + fmt.Println(Red("Watching: "), pname(p.Name, 1), Magenta(files), "files", Magenta(folders), "folders") + fmt.Println() go routines(p, channel, &wr) p.reload = time.Now().Truncate(time.Second) @@ -151,7 +151,7 @@ func (p *Project) watching() { wr.Wait() channel = make(chan bool) } - err := p.fmt(event.Name[:i]+ext) + err := p.fmt(event.Name[:i] + ext) if err == nil { } else { fmt.Println(Red(err)) @@ -234,10 +234,10 @@ func (p *Project) ignore(str string) bool { // Routines launches the following methods: run, build, fmt, install func routines(p *Project, channel chan bool, wr *sync.WaitGroup) { - wr.Add(1) - go p.build() - go p.install(channel, wr) - wr.Wait() + wr.Add(1) + go p.build() + go p.install(channel, wr) + wr.Wait() } // check if a string is inArray