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
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