fix ineffassign: use processes array

uses processes variable instead of calling the Processes() func again

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
This commit is contained in:
Daniel Dao 2017-01-11 22:32:37 +00:00
parent 23a644de8a
commit 726b88f9b7
No known key found for this signature in database
GPG key ID: E59A5D531B20D399

View file

@ -35,7 +35,7 @@ func New(ctx context.Context, executor Executor) (*Service, error) {
// generate exit event for all processes, (generate event for init last)
processes := c.Processes()
processes = append(processes[1:], processes[0])
for _, p := range c.Processes() {
for _, p := range processes {
if p.Status() != Stopped {
p.Signal(os.Kill)
}