From 8eaa7601a443a80c62278f9858713ba09daf725f Mon Sep 17 00:00:00 2001 From: rubyist Date: Fri, 7 Aug 2015 09:37:03 -0400 Subject: [PATCH] clean that up a little --- lfs/client.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lfs/client.go b/lfs/client.go index 669f6335..dd081f00 100644 --- a/lfs/client.go +++ b/lfs/client.go @@ -71,16 +71,15 @@ func (o *objectResource) NewRequest(relation, method string) (*http.Request, Cre } func (o *objectResource) Rel(name string) (*linkRelation, bool) { - actions := o.Actions - if actions == nil { - actions = o.Links + var rel *linkRelation + var ok bool + + if o.Actions != nil { + rel, ok = o.Actions[name] + } else { + rel, ok = o.Links[name] } - if actions == nil { - return nil, false - } - - rel, ok := actions[name] return rel, ok }