Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed Aug 8, 2019
1 parent 6a71255 commit 19addcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/skaffold/trigger/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ func NewTrigger(runctx *runcontext.RunContext) (Trigger, error) {
Interval: time.Duration(runctx.Opts.WatchPollInterval) * time.Millisecond,
}, nil
case "notify":
return newFSNotifyTrigger(runctx)
return newFSNotifyTrigger(runctx), nil
case "manual":
return &manualTrigger{}, nil
default:
return nil, fmt.Errorf("unsupported trigger: %s", runctx.Opts.Trigger)
}
}

func newFSNotifyTrigger(runctx *runcontext.RunContext) (*fsNotifyTrigger, error) {
func newFSNotifyTrigger(runctx *runcontext.RunContext) *fsNotifyTrigger {
workspaces := map[string]struct{}{}
for _, a := range runctx.Cfg.Build.Artifacts {
workspaces[a.Workspace] = struct{}{}
}
return &fsNotifyTrigger{
Interval: time.Duration(runctx.Opts.WatchPollInterval) * time.Millisecond,
workspaces: workspaces,
}, nil
}
}

// pollTrigger watches for changes on a given interval of time.
Expand Down

0 comments on commit 19addcb

Please sign in to comment.