From 2ffad35d97f115e87812ed396e3420ae5f52c91b Mon Sep 17 00:00:00 2001 From: Michael K Date: Wed, 26 Nov 2014 16:21:39 +0100 Subject: [PATCH] Removed goto --- feed.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/feed.go b/feed.go index 07d2537..85b6f96 100644 --- a/feed.go +++ b/feed.go @@ -294,15 +294,12 @@ func (this *Feed) testVersions() bool { func (this *Feed) GetVersionInfo(doc *xmlx.Document) (ftype string, fversion [2]int) { var node *xmlx.Node - if node = doc.SelectNode("http://www.w3.org/2005/Atom", "feed"); node == nil { - goto rss + if node = doc.SelectNode("http://www.w3.org/2005/Atom", "feed"); node != nil { + ftype = "atom" + fversion = [2]int{1, 0} + return } - ftype = "atom" - fversion = [2]int{1, 0} - return - -rss: if node = doc.SelectNode("", "rss"); node != nil { ftype = "rss" major := 0