Skip to content

Commit 3327dee

Browse files
Change module path to github.com/hashicorp/hcl/v2
This is in preparation for the first v2 release from the main HCL repository.
1 parent af14e80 commit 3327dee

File tree

134 files changed

+189
-220
lines changed

Some content is hidden

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

134 files changed

+189
-220
lines changed

cmd/hcldec/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you have a working Go development environment, you can install this tool
2222
with `go get` in the usual way:
2323

2424
```
25-
$ go get -u github.com/hashicorp/hcl2/cmd/hcldec
25+
$ go get -u github.com/hashicorp/hcl/v2/cmd/hcldec
2626
```
2727

2828
This will install `hcldec` in `$GOPATH/bin`, which usually places it into

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/hcl2/hcl"
7+
"github.com/hashicorp/hcl/v2/hcl"
88
)
99

1010
type jsonDiagWriter struct {

cmd/hcldec/main.go

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

10-
"github.com/hashicorp/hcl2/hcl"
11-
"github.com/hashicorp/hcl2/hcldec"
12-
"github.com/hashicorp/hcl2/hclparse"
10+
"github.com/hashicorp/hcl/v2/hcl"
11+
"github.com/hashicorp/hcl/v2/hcldec"
12+
"github.com/hashicorp/hcl/v2/hclparse"
1313
flag "github.com/spf13/pflag"
1414
"github.com/zclconf/go-cty/cty"
1515
"github.com/zclconf/go-cty/cty/function"

cmd/hcldec/spec.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package main
33
import (
44
"fmt"
55

6-
"github.com/hashicorp/hcl2/ext/userfunc"
7-
"github.com/hashicorp/hcl2/gohcl"
8-
"github.com/hashicorp/hcl2/hcl"
9-
"github.com/hashicorp/hcl2/hcldec"
6+
"github.com/hashicorp/hcl/v2/ext/userfunc"
7+
"github.com/hashicorp/hcl/v2/gohcl"
8+
"github.com/hashicorp/hcl/v2/hcl"
9+
"github.com/hashicorp/hcl/v2/hcldec"
1010
"github.com/zclconf/go-cty/cty"
1111
"github.com/zclconf/go-cty/cty/function"
1212
)

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/hcl2/hcl"
7+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
7+
"github.com/hashicorp/hcl/v2/hcl"
88
"github.com/zclconf/go-cty/cty"
99
)
1010

cmd/hclfmt/main.go

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

12-
"github.com/hashicorp/hcl2/hcl"
13-
"github.com/hashicorp/hcl2/hclparse"
14-
"github.com/hashicorp/hcl2/hclwrite"
12+
"github.com/hashicorp/hcl/v2/hcl"
13+
"github.com/hashicorp/hcl/v2/hclparse"
14+
"github.com/hashicorp/hcl/v2/hclwrite"
1515
"golang.org/x/crypto/ssh/terminal"
1616
)
1717

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/hcl2/hcl"
7+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
55
)
66

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

cmd/hclspecsuite/main.go

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

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

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

1414
func main() {

cmd/hclspecsuite/runner.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"github.com/zclconf/go-cty/cty/convert"
1616
ctyjson "github.com/zclconf/go-cty/cty/json"
1717

18-
"github.com/hashicorp/hcl2/ext/typeexpr"
19-
"github.com/hashicorp/hcl2/hcl"
20-
"github.com/hashicorp/hcl2/hclparse"
18+
"github.com/hashicorp/hcl/v2/ext/typeexpr"
19+
"github.com/hashicorp/hcl/v2/hcl"
20+
"github.com/hashicorp/hcl/v2/hclparse"
2121
)
2222

2323
type Runner struct {

cmd/hclspecsuite/test_file.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"github.com/zclconf/go-cty/cty"
77
"github.com/zclconf/go-cty/cty/convert"
88

9-
"github.com/hashicorp/hcl2/ext/typeexpr"
10-
"github.com/hashicorp/hcl2/gohcl"
11-
"github.com/hashicorp/hcl2/hcl"
9+
"github.com/hashicorp/hcl/v2/ext/typeexpr"
10+
"github.com/hashicorp/hcl/v2/gohcl"
11+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
7+
"github.com/hashicorp/hcl/v2/hcl"
88
)
99

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

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/hcl2/hcl"
6+
"github.com/hashicorp/hcl/v2/hcl"
77
"github.com/zclconf/go-cty/cty"
88
)
99

ext/dynblock/expand_body_test.go

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

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

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/hcl2/hcl"
6+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
3+
import "github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
55
"github.com/zclconf/go-cty/cty"
66
)
77

ext/dynblock/variables_hcldec.go

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

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

88
// VariablesHCLDec is a wrapper around WalkVariables that uses the given hcldec

ext/dynblock/variables_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"reflect"
55
"testing"
66

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

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

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

1616
func TestVariables(t *testing.T) {

ext/include/file_resolver.go

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

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

1111
// FileResolver creates and returns a Resolver that interprets include paths

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/hcl2/hcl"
6+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
55
)
66

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

ext/include/transformer.go

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

33
import (
4-
"github.com/hashicorp/hcl2/ext/transform"
5-
"github.com/hashicorp/hcl2/gohcl"
6-
"github.com/hashicorp/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/ext/transform"
5+
"github.com/hashicorp/hcl/v2/gohcl"
6+
"github.com/hashicorp/hcl/v2/hcl"
77
)
88

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

ext/include/transformer_test.go

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

77
"github.com/davecgh/go-spew/spew"
8-
"github.com/hashicorp/hcl2/gohcl"
9-
"github.com/hashicorp/hcl2/hcl"
10-
"github.com/hashicorp/hcl2/hcltest"
8+
"github.com/hashicorp/hcl/v2/gohcl"
9+
"github.com/hashicorp/hcl/v2/hcl"
10+
"github.com/hashicorp/hcl/v2/hcltest"
1111
"github.com/zclconf/go-cty/cty"
1212
)
1313

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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
55
)
66

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

ext/transform/transform_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55

66
"reflect"
77

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

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/hcl2/hcl"
4+
"github.com/hashicorp/hcl/v2/hcl"
55
)
66

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

ext/typeexpr/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ to allow only calls and keywords the JSON syntax is able to parse the given
3535
string directly as an expression, rather than as a template as would be
3636
the case for normal expression evaluation.
3737

38-
For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl2/ext/typeexpr).
38+
For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl/v2/ext/typeexpr).
3939

4040
## Type Expression Syntax
4141

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/hcl2/hcl"
6+
"github.com/hashicorp/hcl/v2/hcl"
77
"github.com/zclconf/go-cty/cty"
88
)
99

ext/typeexpr/get_type_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package typeexpr
33
import (
44
"testing"
55

6-
"github.com/hashicorp/hcl2/gohcl"
6+
"github.com/hashicorp/hcl/v2/gohcl"
77

8-
"github.com/hashicorp/hcl2/hcl"
9-
"github.com/hashicorp/hcl2/hcl/hclsyntax"
10-
"github.com/hashicorp/hcl2/hcl/json"
8+
"github.com/hashicorp/hcl/v2/hcl"
9+
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
10+
"github.com/hashicorp/hcl/v2/hcl/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/hcl2/hcl/hclsyntax"
8+
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
99

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

ext/userfunc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ inclusion in a `hcl.EvalContext`. It also returns a new `cty.Body` that
2525
contains the remainder of the content from the given body, allowing for
2626
further processing of remaining content.
2727

28-
For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl2/ext/userfunc).
28+
For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl/v2/ext/userfunc).

0 commit comments

Comments
 (0)