Skip to content

Commit 5ac8d55

Browse files
committed
Fix Go get_latest_version
1 parent 0529f80 commit 5ac8d55

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/docs/scrapers/go.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ class Go < UrlScraper
2525
HTML
2626

2727
def get_latest_version(opts)
28-
doc = fetch_doc('https://golang.org/pkg/', opts)
29-
30-
footer = doc.at_css('#footer').content
31-
version = footer.scan(/go([0-9.]+)/)[0][0]
32-
version = version[0...-1] if version.end_with?('.')
33-
34-
version
28+
doc = fetch_doc('https://golang.org/project/', opts)
29+
doc.at_css('#page ul > li > a').text[3..-1]
3530
end
3631

3732
private

0 commit comments

Comments
 (0)