Clean cherry-pick of https://github.com/go-gitea/gitea/pull/32916. Update all go tool dependencies to latest version.