Repository: kubernetes-sigs/kubebuilder (language: go)

Issue:
remove `godebug default=go1.X` noop lines
Using 
```
go 1.X.p
godebug default=go1.X
```
in go.mod is adding 1 extra noise line doing nothing (afaik)
as the behavior of the go toolchain is exactly to use go1.X when not otherwise specified

_Originally posted by @ldemailly in https://github.com/kubernetes-sigs/kubebuilder/pull/4446#discussion_r2056844088_
            


Discussion / hints:

Fix patch:
diff --git a/go.mod b/go.mod
index 54c9e37de39..d2b30c6bcf4 100644
--- a/go.mod
+++ b/go.mod
@@ -2,8 +2,6 @@ module sigs.k8s.io/kubebuilder/v4
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/gobuffalo/flect v1.0.3
 	github.com/onsi/ginkgo/v2 v2.23.4
diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go
index 21d8071b3f8..d4c9e79fb65 100644
--- a/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go
+++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go
@@ -47,8 +47,6 @@ const goModTemplate = `module {{ .Repo }}
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }}
 )


Test patch:
diff --git a/docs/book/src/cronjob-tutorial/testdata/project/go.mod b/docs/book/src/cronjob-tutorial/testdata/project/go.mod
index 74525bbcb7f..ed3978a40b3 100644
--- a/docs/book/src/cronjob-tutorial/testdata/project/go.mod
+++ b/docs/book/src/cronjob-tutorial/testdata/project/go.mod
@@ -2,8 +2,6 @@ module tutorial.kubebuilder.io/project
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/onsi/ginkgo/v2 v2.22.0
 	github.com/onsi/gomega v1.36.1
diff --git a/docs/book/src/getting-started/testdata/project/go.mod b/docs/book/src/getting-started/testdata/project/go.mod
index 03026f8f2f9..6182b3b67d2 100644
--- a/docs/book/src/getting-started/testdata/project/go.mod
+++ b/docs/book/src/getting-started/testdata/project/go.mod
@@ -2,8 +2,6 @@ module example.com/memcached
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/onsi/ginkgo/v2 v2.22.0
 	github.com/onsi/gomega v1.36.1
diff --git a/docs/book/src/multiversion-tutorial/testdata/project/go.mod b/docs/book/src/multiversion-tutorial/testdata/project/go.mod
index 74525bbcb7f..ed3978a40b3 100644
--- a/docs/book/src/multiversion-tutorial/testdata/project/go.mod
+++ b/docs/book/src/multiversion-tutorial/testdata/project/go.mod
@@ -2,8 +2,6 @@ module tutorial.kubebuilder.io/project
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/onsi/ginkgo/v2 v2.22.0
 	github.com/onsi/gomega v1.36.1
diff --git a/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/go.mod b/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/go.mod
index b2a2b7328a6..4fd05b5230f 100644
--- a/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/go.mod
+++ b/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/go.mod
@@ -2,8 +2,6 @@ module v1
 
 go 1.23.0
 
-godebug default=go1.23
-
 require (
 	github.com/spf13/pflag v1.0.6
 	sigs.k8s.io/kubebuilder/v4 v4.5.2
diff --git a/testdata/project-v4-multigroup/go.mod b/testdata/project-v4-multigroup/go.mod
index d90d43dd794..6e355562ad9 100644
--- a/testdata/project-v4-multigroup/go.mod
+++ b/testdata/project-v4-multigroup/go.mod
@@ -2,8 +2,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/cert-manager/cert-manager v1.17.1
 	github.com/onsi/ginkgo/v2 v2.22.0
diff --git a/testdata/project-v4-with-plugins/go.mod b/testdata/project-v4-with-plugins/go.mod
index 99d85f3e1ba..1c3b635ea05 100644
--- a/testdata/project-v4-with-plugins/go.mod
+++ b/testdata/project-v4-with-plugins/go.mod
@@ -2,8 +2,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4-with-plugins
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/onsi/ginkgo/v2 v2.22.0
 	github.com/onsi/gomega v1.36.1
diff --git a/testdata/project-v4/go.mod b/testdata/project-v4/go.mod
index 5b2b2b0ba0e..f89be47953d 100644
--- a/testdata/project-v4/go.mod
+++ b/testdata/project-v4/go.mod
@@ -2,8 +2,6 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4
 
 go 1.24.0
 
-godebug default=go1.24
-
 require (
 	github.com/cert-manager/cert-manager v1.17.1
 	github.com/onsi/ginkgo/v2 v2.22.0