From f131e1a873a11cde55cc214717f7b19ee300653e Mon Sep 17 00:00:00 2001 From: sharpevo Date: Mon, 20 Nov 2023 22:06:50 +0800 Subject: [PATCH 1/2] Fix the regexp for Golang generic functions --- lib/docs/filters/go/entries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/go/entries.rb b/lib/docs/filters/go/entries.rb index e125b8fe..3d1c9d2c 100644 --- a/lib/docs/filters/go/entries.rb +++ b/lib/docs/filters/go/entries.rb @@ -28,7 +28,7 @@ module Docs case node.content when /type\ (\w+)/ name = "#{package}.#{$1}" - when /func\ (?:\(.+\)\ )?(\w+)\(/ + when /func\ (?:\(.+\)\ )?(\w+)[\(\[]/ name = "#{$1}()" name.prepend "#{$1}." if node['href'] =~ /#(\w+)\.#{$1}/ name.prepend "#{package}." From 9d0d3ec933ae2cdca8165b9f259215ba7d01b083 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 5 Jan 2024 19:33:59 +0100 Subject: [PATCH 2/2] Update Go documentation (1.21.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 d811f3c4..c94a5455 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.21.0' + self.release = '1.21.5' self.base_url = 'https://golang.org/pkg/' self.links = { home: 'https://golang.org/', @@ -10,10 +10,10 @@ module Docs # Run godoc locally, since https://golang.org/pkg/ redirects to https://pkg.go.dev/std with rate limiting / scraping protection. - # docker run --expose=6060 --rm -it docker.io/golang:1.18.0 - #docker# go install golang.org/x/tools/cmd/godoc@latest - #docker# rm -r /usr/local/go/test/ - #docker# godoc -http 0.0.0.0:6060 -v + # podman run --net host --rm -it docker.io/golang:1.21.5 + #podman# go install golang.org/x/tools/cmd/godoc@latest + #podman# rm -r /usr/local/go/test/ + #podman# godoc -http 0.0.0.0:6060 -v self.base_url = 'http://localhost:6060/pkg/' html_filters.push 'clean_local_urls'