[devdocsgjs/main: 66/239] Update Go documentation (1.17.5)




commit 34579453bfb529b5d4ec9f19be33c6d85461a2b2
Author: Simon Legner <Simon Legner gmail com>
Date:   Wed Dec 22 00:00:02 2021 +0100

    Update Go documentation (1.17.5)

 lib/docs/scrapers/go.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb
index 4d72474d..da23bb32 100644
--- a/lib/docs/scrapers/go.rb
+++ b/lib/docs/scrapers/go.rb
@@ -1,7 +1,7 @@
 module Docs
   class Go < UrlScraper
     self.type = 'go'
-    self.release = '1.17.2'
+    self.release = '1.17.5'
     self.base_url = 'https://golang.org/pkg/'
     self.links = {
       home: 'https://golang.org/',
@@ -10,9 +10,9 @@ module Docs
 
     # Run godoc locally, since https://golang.org/pkg/ redirects to https://pkg.go.dev/std with rate 
limiting / scraping protection.
 
-    # curl -LO https://golang.org/dl/go1.17.2.windows-amd64.zip
+    # curl -LO https://golang.org/dl/go1.17.5.windows-amd64.zip
     # go install golang.org/x/tools/cmd/godoc@latest
-    # go/bin/godoc -zip=go1.17.2.windows-amd64.zip -goroot=/go
+    # go/bin/godoc -zip=go1.17.5.windows-amd64.zip -goroot=/go
     self.base_url = 'http://localhost:6060/pkg/'
 
     html_filters.push 'clean_local_urls'
@@ -34,8 +34,8 @@ module Docs
     HTML
 
     def get_latest_version(opts)
-      doc = fetch_doc('https://golang.org/project/', opts)
-      doc.at_css('#page ul > li > a').text[3..-1]
+      doc = fetch_doc('https://go.dev/dl/', opts)
+      doc.at_css('.download[href]')['href'][/go1[0-9.]+[0-9]/][2..]
     end
 
     private


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]