From 4c47d97b54ae23538b4029f5ca581698e6ad11fc Mon Sep 17 00:00:00 2001 From: Brianna Becker Date: Tue, 19 Nov 2024 17:22:54 +0100 Subject: [PATCH] Revert package renaming for git diff --- packages/hclmerge/hclmerge.go => hcl/hcl.go | 2 +- .../hclmerge/hclmerge_test.go => hcl/hcl_test.go | 12 ++++++------ main.go | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) rename packages/hclmerge/hclmerge.go => hcl/hcl.go (99%) rename packages/hclmerge/hclmerge_test.go => hcl/hcl_test.go (94%) diff --git a/packages/hclmerge/hclmerge.go b/hcl/hcl.go similarity index 99% rename from packages/hclmerge/hclmerge.go rename to hcl/hcl.go index 9e72add..56d9095 100644 --- a/packages/hclmerge/hclmerge.go +++ b/hcl/hcl.go @@ -2,7 +2,7 @@ * Copyright SeatGeek * Licensed under the terms of the Apache-2.0 license. See LICENSE file in project root for terms. */ -package hclmerge +package hcl import ( "fmt" diff --git a/packages/hclmerge/hclmerge_test.go b/hcl/hcl_test.go similarity index 94% rename from packages/hclmerge/hclmerge_test.go rename to hcl/hcl_test.go index d0d5d96..2d19d8f 100644 --- a/packages/hclmerge/hclmerge_test.go +++ b/hcl/hcl_test.go @@ -2,12 +2,12 @@ * Copyright SeatGeek * Licensed under the terms of the Apache-2.0 license. See LICENSE file in project root for terms. */ -package hclmerge_test +package hcl_test import ( "testing" - "github.com/seatgeek/node-hcl/packages/hclmerge" + "github.com/seatgeek/node-hcl/hcl" "github.com/stretchr/testify/assert" ) @@ -17,7 +17,7 @@ func TestMerge(t *testing.T) { type input struct { a string b string - options *hclmerge.MergeOptions + options *hcl.MergeOptions } tests := []struct { @@ -135,7 +135,7 @@ variable "b" { } } `, - options: &hclmerge.MergeOptions{ + options: &hcl.MergeOptions{ MergeMapKeys: true, }, }, @@ -197,7 +197,7 @@ variable "b" { } } }`, - options: &hclmerge.MergeOptions{ + options: &hcl.MergeOptions{ MergeMapKeys: true, }, }, @@ -238,7 +238,7 @@ variable "b" { t.Run(tc.name, func(t *testing.T) { t.Parallel() - merger := hclmerge.NewMerger(tc.input.options) + merger := hcl.NewMerger(tc.input.options) got, err := merger.Merge(tc.input.a, tc.input.b) assert.Equal(t, tc.want, got) diff --git a/main.go b/main.go index bc5fbb8..da24975 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "fmt" "syscall/js" - "github.com/seatgeek/node-hcl/packages/hclmerge" + "github.com/seatgeek/node-hcl/hcl" ) var jsGlobal js.Value @@ -58,7 +58,7 @@ func main() { return nil, fmt.Errorf("Invalid second argument type, expected string") } - options := &hclmerge.MergeOptions{} + options := &hcl.MergeOptions{} if argCount == 3 { arg2Type := args[2].Type() @@ -74,7 +74,7 @@ func main() { aHclString := args[0].String() bHclString := args[1].String() - hclmerger := hclmerge.NewMerger(options) + hclmerger := hcl.NewMerger(options) return hclmerger.Merge(aHclString, bHclString) })