From e2b96b25661849775dedf441b2f5c555392caa84 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 1 Mar 2024 15:31:37 -0800 Subject: [PATCH] Add a header to go.work --- go.work | 2 ++ hack/update-go-workspace.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/go.work b/go.work index 8c7c39cbc95..15a04ac26e8 100644 --- a/go.work +++ b/go.work @@ -1,3 +1,5 @@ +// This is a generated file. Do not edit directly. + go 1.22.0 use ( diff --git a/hack/update-go-workspace.sh b/hack/update-go-workspace.sh index 1142dc147fe..815f2c6bafe 100755 --- a/hack/update-go-workspace.sh +++ b/hack/update-go-workspace.sh @@ -37,6 +37,12 @@ rm -f go.work go.work.sum # Generate the workspace. go work init +( + echo "// This is a generated file. Do not edit directly." + echo + cat go.work +) > .go.work.tmp +mv .go.work.tmp go.work go work edit -use . git ls-files -z ':(glob)./staging/src/k8s.io/*/go.mod' \ | xargs -0 -n1 dirname -z \