bent: write out go.mod by hand and always pass go 1.21

Starting with Go 1.21, if a "too new" language version is discovered in
a go.mod, the go command will fail. This is a problem in bent, because
bent may use a newer dev toolchain to create a go.mod that can't be used
by older Go toolchains.

Since Go 1.21 is where this change happened (and older toolchains will
happily ignore "too new" language versions) use that as the default
minimum go.mod version and write out the go.mod directly.

Change-Id: If510968c62c5155eb692b5e03ffbd34afd8959d4
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/521820
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
1 file changed