From 9438fbd6872c3aa1163bb4dddd8863d2efd1da5b Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Fri, 7 Jun 2024 09:28:57 -0400 Subject: [PATCH] Add setup-envtest Instructions for Go < 1.22 Starting with 0.18, setup-envtest requires golang 1.22. This change updates the README to clarify the required golang version. It also provides an alternative install instruction for developers using golang 1.20 and 1.21. Signed-off-by: Adam Kaplan --- tools/setup-envtest/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/setup-envtest/README.md b/tools/setup-envtest/README.md index 44505dd8a3..0482dd3162 100644 --- a/tools/setup-envtest/README.md +++ b/tools/setup-envtest/README.md @@ -4,13 +4,19 @@ This is a small tool that manages binaries for envtest. It can be used to download new binaries, list currently installed and available ones, and clean up versions. -To use it, just go-install it on 1.19+ (it's a separate, self-contained +To use it, just go-install it with Golang 1.22+ (it's a separate, self-contained module): ```shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest ``` +If you are using Golang 1.20 or 1.21, use the `release-0.17` branch instead: + +```shell +go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.17 +``` + For full documentation, run it with the `--help` flag, but here are some examples: