From 9197940e4e21061febce4115cb79a9594160f0c8 Mon Sep 17 00:00:00 2001 From: unclejack Date: Wed, 14 Dec 2016 23:16:12 +0200 Subject: [PATCH] return directly without ifs in remaining packages Signed-off-by: Cristian Staretu --- command/task/print.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/command/task/print.go b/command/task/print.go index 0f1c2cf724..57c4e0c8c8 100644 --- a/command/task/print.go +++ b/command/task/print.go @@ -70,11 +70,7 @@ func Print(dockerCli *command.DockerCli, ctx context.Context, tasks []swarm.Task defer writer.Flush() fmt.Fprintln(writer, strings.Join([]string{"ID", "NAME", "IMAGE", "NODE", "DESIRED STATE", "CURRENT STATE", "ERROR", "PORTS"}, "\t")) - if err := print(writer, ctx, tasks, resolver, noTrunc); err != nil { - return err - } - - return nil + return print(writer, ctx, tasks, resolver, noTrunc) } // PrintQuiet shows task list in a quiet way.