From 26825627c284b4f53d5e7ef0b3358a83a80bd95c Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 2 Jul 2021 11:01:58 -0400 Subject: [PATCH] Simplifying goGet function --- cobra/cmd/init.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cobra/cmd/init.go b/cobra/cmd/init.go index 6e4c4f1..dbdc25b 100644 --- a/cobra/cmd/init.go +++ b/cobra/cmd/init.go @@ -116,8 +116,7 @@ type CurDir struct { } func goGet(mod string) error { - cmd := exec.Command("go", "get", mod) - return cmd.Run() + return exec.Command("go", "get", mod).Run() } func modInfoJSON(args ...string) []byte {