From a31cbb58cc66fa2df3c4405a0eef8bc8e6597617 Mon Sep 17 00:00:00 2001 From: hectorgabucio Date: Fri, 9 Oct 2020 19:20:52 +0200 Subject: [PATCH] GH-30 change to err idiomatic approach --- server/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugin.go b/server/plugin.go index 29e1010..11f839f 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -72,8 +72,8 @@ func (p *Plugin) OnActivate() error { return errors.Wrap(appErr, "failed to set profile image") } - if cmdErr := p.API.RegisterCommand(getCommand()); cmdErr != nil { - p.API.LogWarn("Error registering Jenkins custom command", "err", cmdErr) + if err := p.API.RegisterCommand(getCommand()); err != nil { + p.API.LogWarn("Error registering Jenkins custom command", "err", err) } p.router = p.InitAPI()