mirror of https://github.com/maxcnunes/gaper.git
Apply improvements suggested by the linter
This commit is contained in:
parent
f578db31da
commit
586c834cb9
1
Makefile
1
Makefile
|
@ -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:
|
||||||
|
|
3
gaper.go
3
gaper.go
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue