chore(bazel): update Go generator version to v0.31.1
chore(bazel): update Go generator version to v0.31.1

Changes include:
- regapic: fix unused imports
- regapic: fix missing return statement

PiperOrigin-RevId: 461039619

googleapis/googleapis,googleapis/googleapis