From 6cefa29adff03b31060acfc4128c7895391db96e Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Tue, 14 Jul 2020 15:53:27 -0500 Subject: [PATCH] Update goimports script for go 1.14 Without this change, go 1.14 reports this error: ``` cannot find module providing package golang.org/x/tools/cmd/goimports: working directory is not part of a module ``` Ideally this wouldn't rely on kops being in the GOPATH but that may require updating goimports. This can happen in a followup PR --- hack/update-goimports | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hack/update-goimports b/hack/update-goimports index bd86f2d9d9728..589d665939151 100755 --- a/hack/update-goimports +++ b/hack/update-goimports @@ -36,7 +36,4 @@ for package in packages: print("packages %s" % paths) -env = os.environ -env["GO111MODULE"] = "on" - -subprocess.call(['go', 'run', 'golang.org/x/tools/cmd/goimports', '-w'] + paths, cwd=path.join(gopath, 'src'), env=env) +subprocess.call(['go', 'run', 'golang.org/x/tools/cmd/goimports', '-w'] + paths, cwd=path.join(gopath, 'src'))