summaryrefslogtreecommitdiff
path: root/cmd/gen-posix/main.go
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-20 23:22:30 -0400
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-21 01:16:46 -0400
commitd8bcbe893b909276cb51004204da708121c9dd22 (patch)
tree26f59d37cad13292d1bcb7ee7f615f5a1335da1d /cmd/gen-posix/main.go
parentb51fb9122deced304bf316d7f8ac3309324e35f7 (diff)
gen-posix: Use the cache, check errors, get it working like it wasHEADmain
as much as I can, anyway
Diffstat (limited to 'cmd/gen-posix/main.go')
-rw-r--r--cmd/gen-posix/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/gen-posix/main.go b/cmd/gen-posix/main.go
index 7525719..6da598b 100644
--- a/cmd/gen-posix/main.go
+++ b/cmd/gen-posix/main.go
@@ -18,7 +18,7 @@ func (doc Document) URL() string {
}
key := doc.Vendor.Name + "\000" + doc.ID
if _, have := urls[key]; !have {
- urls[key] = doc.Vendor.GetURL(doc.ID)
+ urls[key] = checkURL(doc.Vendor.GetURL(doc.ID))
}
return urls[key]
}
@@ -185,6 +185,8 @@ var tmpl = `{{define "document"}}{{if .}}
func mainWithError() error {
httpcache.UserAgent = "https://git.lukeshu.com/www/tree/cmd/gen-posix"
+ httpcache.ModifyResponse = modifyResponse
+ httpcache.CheckRedirect = checkRedirect
tmpl := template.Must(template.New("page").Parse(tmpl))