Apply improvements suggested by the linter

This commit is contained in:
Max Claus Nunes 2018-07-12 10:35:44 -03:00
parent f578db31da
commit 586c834cb9
3 changed files with 4 additions and 2 deletions

View File

@ -27,6 +27,7 @@ lint:
--deadline=120s \ --deadline=120s \
--line-length=120 \ --line-length=120 \
--enable-all \ --enable-all \
--disable=gochecknoinits --disable=gochecknoglobals \
--vendor ./... --vendor ./...
test: test:

View File

@ -71,7 +71,8 @@ func Run(cfg *Config, chOSSiginal chan os.Signal) error {
return run(cfg, chOSSiginal, builder, runner, watcher) return run(cfg, chOSSiginal, builder, runner, watcher)
} }
func run(cfg *Config, chOSSiginal chan os.Signal, builder Builder, runner Runner, watcher Watcher) error { // nolint: gocyclo // nolint: gocyclo
func run(cfg *Config, chOSSiginal chan os.Signal, builder Builder, runner Runner, watcher Watcher) error {
if err := builder.Build(); err != nil { if err := builder.Build(); err != nil {
return fmt.Errorf("build error: %v", err) return fmt.Errorf("build error: %v", err)
} }

View File

@ -89,7 +89,7 @@ func (w *watcher) Watch() {
} }
// Events get events occurred during the watching // Events get events occurred during the watching
// these events are emited only a file changing is detected // these events are emitted only a file changing is detected
func (w *watcher) Events() chan string { func (w *watcher) Events() chan string {
return w.events return w.events
} }