golang: toolchain not available

search you tried in the issue tracker

toolchain not available

describe your issue

helm-docs 1.13 has been switched in norwoodj/helm-docs@4a68682 to use go 1.22 and now it fails in pre-commit:

build attempt 1...
    => error
    [INFO] Installing environment for https://github.com/norwoodj/helm-docs.
    [INFO] Once installed this environment will be reused.
    [INFO] This may take a few minutes...
    An unexpected error has occurred: CalledProcessError: command: ('/opt/go/bin/go', 'install', './...')
    return code: 1
    stdout: (none)
    stderr:
        go: downloading go1.22 (linux/amd64)
        go: download go1.22 for linux/amd64: toolchain not available
    Check the log at /pc/pre-commit.log

Seen on pre-commit.ci at https://results.pre-commit.ci/run/github/260481808/1710232815.fRXg_2QpTiahEGKp7QY3UQ and GitHub actions at https://github.com/WeblateOrg/helm/actions/runs/8245873073/job/22550706357?pr=419.

While I can probably fix this on GitHub by installing newer go, I cannot do this on https://pre-commit.ci/. But I also have no clue how this is supposed to work.

Possibly related golang issue: golang/go#61455

pre-commit --version

pre-commit 3.6.2

.pre-commit-config.yaml

repos:
- repo: https://github.com/norwoodj/helm-docs
  rev: v1.13.1
  hooks:
  - id: helm-docs-built

~/.cache/pre-commit/pre-commit.log (if present)

No response