Skip to content

Commit

Permalink
Change module path to github.com/hashicorp/hcl/v2
Browse files Browse the repository at this point in the history
This is in preparation for the first v2 release from the main HCL
repository.
  • Loading branch information
apparentlymart committed Sep 9, 2019
1 parent af14e80 commit 3327dee
Show file tree
Hide file tree
Showing 134 changed files with 189 additions and 220 deletions.
2 changes: 1 addition & 1 deletion cmd/hcldec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you have a working Go development environment, you can install this tool
with `go get` in the usual way:

```
$ go get -u github.com/hashicorp/hcl2/cmd/hcldec
$ go get -u github.com/hashicorp/hcl/v2/cmd/hcldec
```

This will install `hcldec` in `$GOPATH/bin`, which usually places it into
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/diags_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"io"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

type jsonDiagWriter struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hcldec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os"
"strings"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcldec"
"github.com/hashicorp/hcl2/hclparse"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/hashicorp/hcl/v2/hclparse"
flag "github.com/spf13/pflag"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
Expand Down
8 changes: 4 additions & 4 deletions cmd/hcldec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"fmt"

"github.com/hashicorp/hcl2/ext/userfunc"
"github.com/hashicorp/hcl2/gohcl"
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcldec"
"github.com/hashicorp/hcl/v2/ext/userfunc"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/type_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"reflect"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/hclfmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"os"
"strings"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hclparse"
"github.com/hashicorp/hcl2/hclwrite"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hclparse"
"github.com/hashicorp/hcl/v2/hclwrite"
"golang.org/x/crypto/ssh/terminal"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

func decodeJSONDiagnostics(src []byte) hcl.Diagnostics {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/log.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

type LogBeginCallback func(testName string, testFile *TestFile)
Expand Down
4 changes: 2 additions & 2 deletions cmd/hclspecsuite/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

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

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hclparse"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hclparse"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hclspecsuite/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/zclconf/go-cty/cty/convert"
ctyjson "github.com/zclconf/go-cty/cty/json"

"github.com/hashicorp/hcl2/ext/typeexpr"
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hclparse"
"github.com/hashicorp/hcl/v2/ext/typeexpr"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hclparse"
)

type Runner struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/hclspecsuite/test_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"

"github.com/hashicorp/hcl2/ext/typeexpr"
"github.com/hashicorp/hcl2/gohcl"
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/ext/typeexpr"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
)

type TestFile struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/traversals.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"reflect"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

func findTraversalSpec(got hcl.Traversal, candidates []*TestFileExpectTraversal) *TestFileExpectTraversal {
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expand_body.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dynblock
import (
"fmt"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions ext/dynblock/expand_body_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package dynblock
import (
"testing"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcldec"
"github.com/hashicorp/hcl2/hcltest"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/hashicorp/hcl/v2/hcltest"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expand_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dynblock
import (
"fmt"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert"
)
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/expr_wrap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/iteration.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/public.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// Expand "dynamic" blocks in the given body, returning a new body that
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/schema.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dynblock

import "github.com/hashicorp/hcl2/hcl"
import "github.com/hashicorp/hcl/v2/hcl"

var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{
Type: "dynamic",
Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/unknown_body.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/dynblock/variables.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
4 changes: 2 additions & 2 deletions ext/dynblock/variables_hcldec.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dynblock

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcldec"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcldec"
)

// VariablesHCLDec is a wrapper around WalkVariables that uses the given hcldec
Expand Down
6 changes: 3 additions & 3 deletions ext/dynblock/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"reflect"
"testing"

"github.com/hashicorp/hcl2/hcldec"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"

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

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcl/hclsyntax"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
)

func TestVariables(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions ext/include/file_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"path/filepath"
"strings"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hclparse"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hclparse"
)

// FileResolver creates and returns a Resolver that interprets include paths
Expand Down
2 changes: 1 addition & 1 deletion ext/include/map_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package include
import (
"fmt"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// MapResolver returns a Resolver that consults the given map for preloaded
Expand Down
2 changes: 1 addition & 1 deletion ext/include/resolver.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package include

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// A Resolver maps an include path (an arbitrary string, but usually something
Expand Down
6 changes: 3 additions & 3 deletions ext/include/transformer.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package include

import (
"github.com/hashicorp/hcl2/ext/transform"
"github.com/hashicorp/hcl2/gohcl"
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/ext/transform"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// Transformer builds a transformer that finds any "include" blocks in a body
Expand Down
6 changes: 3 additions & 3 deletions ext/include/transformer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/hcl2/gohcl"
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcltest"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcltest"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/transform/error.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package transform

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// NewErrorBody returns a hcl.Body that returns the given diagnostics whenever
Expand Down
2 changes: 1 addition & 1 deletion ext/transform/transform.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package transform

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// Shallow is equivalent to calling transformer.TransformBody(body), and
Expand Down
4 changes: 2 additions & 2 deletions ext/transform/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"reflect"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcltest"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcltest"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/transform/transformer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package transform

import (
"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
)

// A Transformer takes a given body, applies some (possibly no-op)
Expand Down
2 changes: 1 addition & 1 deletion ext/typeexpr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ to allow only calls and keywords the JSON syntax is able to parse the given
string directly as an expression, rather than as a template as would be
the case for normal expression evaluation.

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

## Type Expression Syntax

Expand Down
2 changes: 1 addition & 1 deletion ext/typeexpr/get_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package typeexpr
import (
"fmt"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
8 changes: 4 additions & 4 deletions ext/typeexpr/get_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package typeexpr
import (
"testing"

"github.com/hashicorp/hcl2/gohcl"
"github.com/hashicorp/hcl/v2/gohcl"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl2/hcl/hclsyntax"
"github.com/hashicorp/hcl2/hcl/json"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"
"github.com/hashicorp/hcl/v2/hcl/json"
"github.com/zclconf/go-cty/cty"
)

Expand Down
4 changes: 2 additions & 2 deletions ext/typeexpr/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"sort"

"github.com/hashicorp/hcl2/hcl/hclsyntax"
"github.com/hashicorp/hcl/v2/hcl/hclsyntax"

"github.com/hashicorp/hcl2/hcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion ext/userfunc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ inclusion in a `hcl.EvalContext`. It also returns a new `cty.Body` that
contains the remainder of the content from the given body, allowing for
further processing of remaining content.

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

0 comments on commit 3327dee

Please sign in to comment.