From 663aa9c2b10388ad2e0e35bcbf8999426a72b450 Mon Sep 17 00:00:00 2001 From: Maciej Kisielewski Date: Mon, 28 Oct 2024 14:02:40 +0100 Subject: [PATCH] remove unnecessary `if`s --- cmd/build.go | 7 +------ cmd/mock.go | 5 +---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cmd/build.go b/cmd/build.go index e3ef4cf..520dc92 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -28,12 +28,7 @@ var buildCmd = &cobra.Command{ extraMockArgs := impl.MockExtraCmdlineArgs{ NoCheck: noCheck, } - - if err := impl.Build(repo, pkg, defaultArch(), - extraCreateSrpmArgs, extraMockArgs); err != nil { - return err - } - return nil + return impl.Build(repo, pkg, defaultArch(), extraCreateSrpmArgs, extraMockArgs) }, } diff --git a/cmd/mock.go b/cmd/mock.go index 6bcc7be..cee1be8 100644 --- a/cmd/mock.go +++ b/cmd/mock.go @@ -27,10 +27,7 @@ var mockCmd = &cobra.Command{ NoCheck: noCheck, OnlyCreateCfg: onlyCreateCfg, } - if err := impl.Mock(repo, pkg, target, extraArgs); err != nil { - return err - } - return nil + return impl.Mock(repo, pkg, target, extraArgs) }, }