From 40a7ad1934cb1143732c49998e90c2c9ee405f66 Mon Sep 17 00:00:00 2001 From: Amanuel Engeda <74629455+engedaam@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:43:40 -0700 Subject: [PATCH] chore: Update `kompat` directories for importing (#4593) --- tools/kompat/{ => cmd/kompat}/main.go | 8 +++++--- tools/kompat/{ => pkg/kompat}/kompat.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) rename tools/kompat/{ => cmd/kompat}/main.go (95%) rename tools/kompat/{ => pkg/kompat}/kompat.go (99%) diff --git a/tools/kompat/main.go b/tools/kompat/cmd/kompat/main.go similarity index 95% rename from tools/kompat/main.go rename to tools/kompat/cmd/kompat/main.go index 15d35e3f5f23..2ef52a1dd682 100644 --- a/tools/kompat/main.go +++ b/tools/kompat/cmd/kompat/main.go @@ -26,6 +26,8 @@ import ( "github.com/olekukonko/tablewriter" "github.com/samber/lo" "github.com/spf13/cobra" + + "github.com/aws/karpenter/tools/kompat/pkg/kompat" ) const ( @@ -60,14 +62,14 @@ var ( Args: cobra.ArbitraryArgs, Run: func(cmd *cobra.Command, args []string) { if rootOpts.Branch != "" { - DefaultGithubBranch = rootOpts.Branch + kompat.DefaultGithubBranch = rootOpts.Branch } - kompatList, err := Parse(args...) + kompatList, err := kompat.Parse(args...) if err != nil { fmt.Printf("Unable to parse kompat file: %v\n", err) os.Exit(1) } - opts := Options{ + opts := kompat.Options{ LastN: rootOpts.LastNVersions, Version: rootOpts.K8sVersion, } diff --git a/tools/kompat/kompat.go b/tools/kompat/pkg/kompat/kompat.go similarity index 99% rename from tools/kompat/kompat.go rename to tools/kompat/pkg/kompat/kompat.go index ae78084a4f67..47492cabd828 100644 --- a/tools/kompat/kompat.go +++ b/tools/kompat/pkg/kompat/kompat.go @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package kompat import ( "bytes"