Commit Graph

5 Commits

Author SHA1 Message Date
Luke T. Shumaker abd47f50a7 gitcache: Do a better job normalizing URLs 2024-01-28 21:04:01 -07:00
Luke T. Shumaker 5fa579b1e0 gitcache: URL2NS, NS2URL: Clean up 2024-01-28 11:34:31 -07:00
Luke T. Shumaker ff3ffeba9b gitcache: Validate that URL2NS always produces valid NS values 2024-01-28 11:01:07 -07:00
Luke T. Shumaker fbfcb7e8e4 gitcache: Fix round-tripping bugs in url_ns.go 2024-01-28 11:01:07 -07:00
Luke T. Shumaker 1589c0bd4f Resolve linter complaints
- cmd/*: add `_ =` before argparser.Mark*()
    + cmd/gitcache: while I'm at it, call MarkFlagDirname on "cache-dir"
 - source.go: add `_ =` before tar.Writer.WriteHeader()
 - cmd/gitcache: Add `ns2url` and `url2ns` subcommands
   "unused" complaints about lib/gitcache.id2url()
    + lib/gitcache: while I'm at it, rename id2url()→NS2URL() and
      url2id()→URL2NS()
 - cmd/httpd: clarify that parsing r.Form.Get() values is allowed to fail
 - cmd/trigger: delete unsused max() and sortedKeys()
 - lib/gitcache: RevParse(): check for errors from os.RemoveAll(tmpdir)
 - lib/leader:
    + add `_ =` before db.Close() in an `if err != nil` block
    + ListJobs(): check for errors from rows.Close()
    + fix the package name in guard.go
2024-01-20 11:07:48 -07:00