History

Fix Go get_latest_version

Jasper van Merle committed 7 years ago

Commit 5ac8d551 parent 0529f801 file · +2 −7Browse files

Unified · Split

lib/docs/scrapers/go.rb+2−7
@@ -25,13 +25,8 @@ module Docs · 24 unmodified lines
25 HTML25 HTML
26 26
27 def get_latest_version(opts)27 def get_latest_version(opts)
28 doc = fetch_doc('https://golang.org/pkg/', opts)28 doc = fetch_doc('https://golang.org/project/', opts)
29 29 doc.at_css('#page ul > li > a').text[3..-1]
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
35 end30 end
36 31
37 private32 private