From 19c9c7438498bf4ba07506b4eaa76670cd37ae2d Mon Sep 17 00:00:00 2001 From: John McBride Date: Thu, 9 Dec 2021 14:47:27 -0700 Subject: [PATCH] Always include the os package import when generating the root command (#1557) Signed-off-by: John McBride --- cobra/tpl/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra/tpl/main.go b/cobra/tpl/main.go index 8e2fe4e..009524c 100644 --- a/cobra/tpl/main.go +++ b/cobra/tpl/main.go @@ -37,9 +37,9 @@ package cmd import ( {{- if .Viper }} - "fmt" + "fmt"{{ end }} "os" -{{ end }} + "github.com/spf13/cobra" {{- if .Viper }} "github.com/spf13/viper"{{ end }}