Remove toolchain
With go 1.21 the controversial toolchain directive got introduced which forces downstream consumers of libraries to needlessly change their go compiler version with no way to ignore it on an application level without go mod tidy and various tools and linters silently failing. I am of the opinion that libraries shouldn't really set a toolchain to allow consumers to be not bothered by it.
@SuperSandro2000 Thanks for the PR!
I believe that toolchain was added when I ran go get or go mod tidy so this directive will likely reappear after its been removed. How are you automatically preventing the toolchain directive from being re-added? Keeping this directive out of go.mod isn't something I want to manually manage.
I am of the opinion that libraries shouldn't really set a toolchain to allow consumers to be not bothered by it.
FWIW, I mostly agree. If the library doesn't have any such requirements, it shouldn't impose them. e.g. uses language/toolchain features in newer versions
There is currently no way to prevent this being re-added. We kinda fight against it all the time ourselves.