Skip to content

Commit 6c43446

Browse files
Unfold the "hcl" directory up into the root
The main HCL package is more visible this way, and so it's easier than having to pick it out from dozens of other package directories.
1 parent 0f5ab3b commit 6c43446

File tree

219 files changed

+166
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+166
-154
lines changed

cmd/hcldec/diags_json.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"io"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
)
99

1010
type jsonDiagWriter struct {

cmd/hcldec/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/hashicorp/hcl/v2/hcl"
10+
"github.com/hashicorp/hcl/v2"
1111
"github.com/hashicorp/hcl/v2/hcldec"
1212
"github.com/hashicorp/hcl/v2/hclparse"
1313
flag "github.com/spf13/pflag"

cmd/hcldec/spec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/hashicorp/hcl/v2/ext/userfunc"
77
"github.com/hashicorp/hcl/v2/gohcl"
8-
"github.com/hashicorp/hcl/v2/hcl"
8+
"github.com/hashicorp/hcl/v2"
99
"github.com/hashicorp/hcl/v2/hcldec"
1010
"github.com/zclconf/go-cty/cty"
1111
"github.com/zclconf/go-cty/cty/function"

cmd/hcldec/type_expr.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"reflect"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
"github.com/zclconf/go-cty/cty"
99
"github.com/zclconf/go-cty/cty/function"
1010
)

cmd/hcldec/vars.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
"github.com/zclconf/go-cty/cty"
99
)
1010

cmd/hclfmt/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"os"
1010
"strings"
1111

12-
"github.com/hashicorp/hcl/v2/hcl"
12+
"github.com/hashicorp/hcl/v2"
1313
"github.com/hashicorp/hcl/v2/hclparse"
1414
"github.com/hashicorp/hcl/v2/hclwrite"
1515
"golang.org/x/crypto/ssh/terminal"

cmd/hclspecsuite/diagnostics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"fmt"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
)
99

1010
func decodeJSONDiagnostics(src []byte) hcl.Diagnostics {

cmd/hclspecsuite/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
type LogBeginCallback func(testName string, testFile *TestFile)

cmd/hclspecsuite/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"golang.org/x/crypto/ssh/terminal"
99

10-
"github.com/hashicorp/hcl/v2/hcl"
10+
"github.com/hashicorp/hcl/v2"
1111
"github.com/hashicorp/hcl/v2/hclparse"
1212
)
1313

cmd/hclspecsuite/runner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
ctyjson "github.com/zclconf/go-cty/cty/json"
1717

1818
"github.com/hashicorp/hcl/v2/ext/typeexpr"
19-
"github.com/hashicorp/hcl/v2/hcl"
19+
"github.com/hashicorp/hcl/v2"
2020
"github.com/hashicorp/hcl/v2/hclparse"
2121
)
2222

cmd/hclspecsuite/test_file.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/hashicorp/hcl/v2/ext/typeexpr"
1010
"github.com/hashicorp/hcl/v2/gohcl"
11-
"github.com/hashicorp/hcl/v2/hcl"
11+
"github.com/hashicorp/hcl/v2"
1212
)
1313

1414
type TestFile struct {

cmd/hclspecsuite/traversals.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"reflect"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
)
99

1010
func findTraversalSpec(got hcl.Traversal, candidates []*TestFileExpectTraversal) *TestFileExpectTraversal {

hcl/diagnostic.go diagnostic.go

File renamed without changes.
File renamed without changes.
File renamed without changes.

hcl/didyoumean.go didyoumean.go

File renamed without changes.

hcl/doc.go doc.go

File renamed without changes.
File renamed without changes.

hcl/expr_call.go expr_call.go

File renamed without changes.

hcl/expr_list.go expr_list.go

File renamed without changes.

hcl/expr_map.go expr_map.go

File renamed without changes.

hcl/expr_unwrap.go expr_unwrap.go

File renamed without changes.

ext/dynblock/expand_body.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dynblock
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
"github.com/zclconf/go-cty/cty"
88
)
99

ext/dynblock/expand_body_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dynblock
33
import (
44
"testing"
55

6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
"github.com/hashicorp/hcl/v2/hcldec"
88
"github.com/hashicorp/hcl/v2/hcltest"
99
"github.com/zclconf/go-cty/cty"

ext/dynblock/expand_spec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dynblock
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
"github.com/zclconf/go-cty/cty"
88
"github.com/zclconf/go-cty/cty/convert"
99
)

ext/dynblock/expr_wrap.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty"
66
)
77

ext/dynblock/iteration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty"
66
)
77

ext/dynblock/public.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
// Expand "dynamic" blocks in the given body, returning a new body that

ext/dynblock/schema.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package dynblock
22

3-
import "github.com/hashicorp/hcl/v2/hcl"
3+
import "github.com/hashicorp/hcl/v2"
44

55
var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{
66
Type: "dynamic",

ext/dynblock/unknown_body.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty"
66
)
77

ext/dynblock/variables.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty"
66
)
77

ext/dynblock/variables_hcldec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dynblock
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/hashicorp/hcl/v2/hcldec"
66
)
77

ext/dynblock/variables_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"github.com/davecgh/go-spew/spew"
1111

12-
"github.com/hashicorp/hcl/v2/hcl"
13-
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
12+
"github.com/hashicorp/hcl/v2"
13+
"github.com/hashicorp/hcl/v2/hclsyntax"
1414
)
1515

1616
func TestVariables(t *testing.T) {

ext/include/file_resolver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"path/filepath"
55
"strings"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
7+
"github.com/hashicorp/hcl/v2"
88
"github.com/hashicorp/hcl/v2/hclparse"
99
)
1010

ext/include/map_resolver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package include
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
)
88

99
// MapResolver returns a Resolver that consults the given map for preloaded

ext/include/resolver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package include
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
// A Resolver maps an include path (an arbitrary string, but usually something

ext/include/transformer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package include
33
import (
44
"github.com/hashicorp/hcl/v2/ext/transform"
55
"github.com/hashicorp/hcl/v2/gohcl"
6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
)
88

99
// Transformer builds a transformer that finds any "include" blocks in a body

ext/include/transformer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/davecgh/go-spew/spew"
88
"github.com/hashicorp/hcl/v2/gohcl"
9-
"github.com/hashicorp/hcl/v2/hcl"
9+
"github.com/hashicorp/hcl/v2"
1010
"github.com/hashicorp/hcl/v2/hcltest"
1111
"github.com/zclconf/go-cty/cty"
1212
)

ext/transform/error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package transform
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
// NewErrorBody returns a hcl.Body that returns the given diagnostics whenever

ext/transform/transform.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package transform
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
// Shallow is equivalent to calling transformer.TransformBody(body), and

ext/transform/transform_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"reflect"
77

8-
"github.com/hashicorp/hcl/v2/hcl"
8+
"github.com/hashicorp/hcl/v2"
99
"github.com/hashicorp/hcl/v2/hcltest"
1010
"github.com/zclconf/go-cty/cty"
1111
)

ext/transform/transformer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package transform
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
)
66

77
// A Transformer takes a given body, applies some (possibly no-op)

ext/typeexpr/get_type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package typeexpr
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/hcl/v2/hcl"
6+
"github.com/hashicorp/hcl/v2"
77
"github.com/zclconf/go-cty/cty"
88
)
99

ext/typeexpr/get_type_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55

66
"github.com/hashicorp/hcl/v2/gohcl"
77

8-
"github.com/hashicorp/hcl/v2/hcl"
9-
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
10-
"github.com/hashicorp/hcl/v2/hcl/json"
8+
"github.com/hashicorp/hcl/v2"
9+
"github.com/hashicorp/hcl/v2/hclsyntax"
10+
"github.com/hashicorp/hcl/v2/json"
1111
"github.com/zclconf/go-cty/cty"
1212
)
1313

ext/typeexpr/public.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"fmt"
66
"sort"
77

8-
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
8+
"github.com/hashicorp/hcl/v2/hclsyntax"
99

10-
"github.com/hashicorp/hcl/v2/hcl"
10+
"github.com/hashicorp/hcl/v2"
1111
"github.com/zclconf/go-cty/cty"
1212
)
1313

ext/userfunc/decode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package userfunc
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty"
66
"github.com/zclconf/go-cty/cty/function"
77
)

ext/userfunc/decode_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/hashicorp/hcl/v2/hcl"
8-
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
7+
"github.com/hashicorp/hcl/v2"
8+
"github.com/hashicorp/hcl/v2/hclsyntax"
99
"github.com/zclconf/go-cty/cty"
1010
)
1111

ext/userfunc/public.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package userfunc
22

33
import (
4-
"github.com/hashicorp/hcl/v2/hcl"
4+
"github.com/hashicorp/hcl/v2"
55
"github.com/zclconf/go-cty/cty/function"
66
)
77

go.mod

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ require (
77
github.com/davecgh/go-spew v1.1.1
88
github.com/go-test/deep v1.0.3
99
github.com/google/go-cmp v0.2.0
10-
github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 // indirect
1110
github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0
11+
github.com/hashicorp/hcl2 v0.0.0-20190909202536-66c59f909e25 // indirect
1212
github.com/kr/pretty v0.1.0
1313
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
1414
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7
15-
github.com/pmezard/go-difflib v1.0.0 // indirect
1615
github.com/sergi/go-diff v1.0.0
1716
github.com/spf13/pflag v1.0.2
18-
github.com/stretchr/testify v1.2.2 // indirect
1917
github.com/zclconf/go-cty v1.0.0
2018
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734
21-
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
22-
golang.org/x/text v0.3.2 // indirect
2319
gopkg.in/yaml.v2 v2.2.2
2420
howett.net/plist v0.0.0-20181124034731-591f970eefbb
2521
)

0 commit comments

Comments
 (0)