From 3327dee5673a51b4c44c908170d0ca615d08cddb Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 9 Sep 2019 15:39:31 -0700 Subject: [PATCH] Change module path to github.com/hashicorp/hcl/v2 This is in preparation for the first v2 release from the main HCL repository. --- cmd/hcldec/README.md | 2 +- cmd/hcldec/diags_json.go | 2 +- cmd/hcldec/main.go | 6 +++--- cmd/hcldec/spec.go | 8 ++++---- cmd/hcldec/type_expr.go | 2 +- cmd/hcldec/vars.go | 2 +- cmd/hclfmt/main.go | 6 +++--- cmd/hclspecsuite/diagnostics.go | 2 +- cmd/hclspecsuite/log.go | 2 +- cmd/hclspecsuite/main.go | 4 ++-- cmd/hclspecsuite/runner.go | 6 +++--- cmd/hclspecsuite/test_file.go | 6 +++--- cmd/hclspecsuite/traversals.go | 2 +- ext/dynblock/expand_body.go | 2 +- ext/dynblock/expand_body_test.go | 6 +++--- ext/dynblock/expand_spec.go | 2 +- ext/dynblock/expr_wrap.go | 2 +- ext/dynblock/iteration.go | 2 +- ext/dynblock/public.go | 2 +- ext/dynblock/schema.go | 2 +- ext/dynblock/unknown_body.go | 2 +- ext/dynblock/variables.go | 2 +- ext/dynblock/variables_hcldec.go | 4 ++-- ext/dynblock/variables_test.go | 6 +++--- ext/include/file_resolver.go | 4 ++-- ext/include/map_resolver.go | 2 +- ext/include/resolver.go | 2 +- ext/include/transformer.go | 6 +++--- ext/include/transformer_test.go | 6 +++--- ext/transform/error.go | 2 +- ext/transform/transform.go | 2 +- ext/transform/transform_test.go | 4 ++-- ext/transform/transformer.go | 2 +- ext/typeexpr/README.md | 2 +- ext/typeexpr/get_type.go | 2 +- ext/typeexpr/get_type_test.go | 8 ++++---- ext/typeexpr/public.go | 4 ++-- ext/userfunc/README.md | 2 +- ext/userfunc/decode.go | 2 +- ext/userfunc/decode_test.go | 4 ++-- ext/userfunc/public.go | 2 +- go.mod | 9 +-------- go.sum | 24 ----------------------- gohcl/decode.go | 2 +- gohcl/decode_test.go | 4 ++-- gohcl/encode.go | 2 +- gohcl/encode_test.go | 4 ++-- gohcl/schema.go | 2 +- gohcl/schema_test.go | 2 +- gohcl/types.go | 2 +- guide/go_decoding_gohcl.rst | 2 +- guide/go_decoding_hcldec.rst | 2 +- guide/go_decoding_lowlevel.rst | 2 +- guide/go_parsing.rst | 2 +- hcl/hclsyntax/diagnostics.go | 2 +- hcl/hclsyntax/expression.go | 2 +- hcl/hclsyntax/expression_ops.go | 2 +- hcl/hclsyntax/expression_static_test.go | 2 +- hcl/hclsyntax/expression_template.go | 2 +- hcl/hclsyntax/expression_template_test.go | 2 +- hcl/hclsyntax/expression_test.go | 2 +- hcl/hclsyntax/expression_vars.go | 2 +- hcl/hclsyntax/expression_vars_gen.go | 2 +- hcl/hclsyntax/file.go | 2 +- hcl/hclsyntax/fuzz/Makefile | 2 +- hcl/hclsyntax/fuzz/config/fuzz.go | 4 ++-- hcl/hclsyntax/fuzz/expr/fuzz.go | 4 ++-- hcl/hclsyntax/fuzz/template/fuzz.go | 4 ++-- hcl/hclsyntax/fuzz/traversal/fuzz.go | 4 ++-- hcl/hclsyntax/navigation.go | 2 +- hcl/hclsyntax/navigation_test.go | 2 +- hcl/hclsyntax/node.go | 2 +- hcl/hclsyntax/parse_traversal_test.go | 2 +- hcl/hclsyntax/parser.go | 2 +- hcl/hclsyntax/parser_template.go | 2 +- hcl/hclsyntax/parser_test.go | 2 +- hcl/hclsyntax/parser_traversal.go | 2 +- hcl/hclsyntax/peeker.go | 2 +- hcl/hclsyntax/public.go | 2 +- hcl/hclsyntax/scan_tokens.go | 2 +- hcl/hclsyntax/scan_tokens.rl | 2 +- hcl/hclsyntax/scan_tokens_test.go | 2 +- hcl/hclsyntax/structure.go | 2 +- hcl/hclsyntax/structure_at_pos.go | 2 +- hcl/hclsyntax/structure_at_pos_test.go | 2 +- hcl/hclsyntax/structure_test.go | 2 +- hcl/hclsyntax/token.go | 2 +- hcl/hclsyntax/variables.go | 2 +- hcl/hclsyntax/variables_test.go | 2 +- hcl/hclsyntax/walk.go | 2 +- hcl/hclsyntax/walk_test.go | 2 +- hcl/integrationtest/terraformlike_test.go | 12 ++++++------ hcl/json/ast.go | 2 +- hcl/json/fuzz/Makefile | 2 +- hcl/json/fuzz/config/fuzz.go | 2 +- hcl/json/parser.go | 2 +- hcl/json/parser_test.go | 2 +- hcl/json/public.go | 2 +- hcl/json/public_test.go | 2 +- hcl/json/scanner.go | 2 +- hcl/json/scanner_test.go | 2 +- hcl/json/structure.go | 4 ++-- hcl/json/structure_test.go | 2 +- hcl/spectests/spec_test.go | 4 ++-- hcldec/block_labels.go | 2 +- hcldec/decode.go | 2 +- hcldec/public.go | 2 +- hcldec/public_test.go | 4 ++-- hcldec/schema.go | 2 +- hcldec/spec.go | 2 +- hcldec/spec_test.go | 4 ++-- hcldec/variables.go | 2 +- hcldec/variables_test.go | 4 ++-- hcled/navigation.go | 2 +- hclparse/parser.go | 6 +++--- hcltest/mock.go | 4 ++-- hcltest/mock_test.go | 2 +- hclwrite/ast_attribute.go | 2 +- hclwrite/ast_block.go | 2 +- hclwrite/ast_body.go | 4 ++-- hclwrite/ast_body_test.go | 4 ++-- hclwrite/ast_expression.go | 4 ++-- hclwrite/examples_test.go | 4 ++-- hclwrite/format.go | 2 +- hclwrite/format_test.go | 2 +- hclwrite/generate.go | 4 ++-- hclwrite/generate_test.go | 2 +- hclwrite/native_node_sorter.go | 2 +- hclwrite/parser.go | 4 ++-- hclwrite/parser_test.go | 4 ++-- hclwrite/public.go | 2 +- hclwrite/round_trip_test.go | 4 ++-- hclwrite/tokens.go | 4 ++-- specsuite/README.md | 2 +- 134 files changed, 189 insertions(+), 220 deletions(-) diff --git a/cmd/hcldec/README.md b/cmd/hcldec/README.md index a037a4c..963a89f 100644 --- a/cmd/hcldec/README.md +++ b/cmd/hcldec/README.md @@ -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 diff --git a/cmd/hcldec/diags_json.go b/cmd/hcldec/diags_json.go index e24181f..d9f2883 100644 --- a/cmd/hcldec/diags_json.go +++ b/cmd/hcldec/diags_json.go @@ -4,7 +4,7 @@ import ( "encoding/json" "io" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) type jsonDiagWriter struct { diff --git a/cmd/hcldec/main.go b/cmd/hcldec/main.go index 16dbb03..42e4bab 100644 --- a/cmd/hcldec/main.go +++ b/cmd/hcldec/main.go @@ -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" diff --git a/cmd/hcldec/spec.go b/cmd/hcldec/spec.go index c8b90d3..6bb5214 100644 --- a/cmd/hcldec/spec.go +++ b/cmd/hcldec/spec.go @@ -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" ) diff --git a/cmd/hcldec/type_expr.go b/cmd/hcldec/type_expr.go index 559277f..44eed52 100644 --- a/cmd/hcldec/type_expr.go +++ b/cmd/hcldec/type_expr.go @@ -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" ) diff --git a/cmd/hcldec/vars.go b/cmd/hcldec/vars.go index f2ec1b4..98450c8 100644 --- a/cmd/hcldec/vars.go +++ b/cmd/hcldec/vars.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/cmd/hclfmt/main.go b/cmd/hclfmt/main.go index 5223897..582f183 100644 --- a/cmd/hclfmt/main.go +++ b/cmd/hclfmt/main.go @@ -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" ) diff --git a/cmd/hclspecsuite/diagnostics.go b/cmd/hclspecsuite/diagnostics.go index a559f1b..97b953f 100644 --- a/cmd/hclspecsuite/diagnostics.go +++ b/cmd/hclspecsuite/diagnostics.go @@ -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 { diff --git a/cmd/hclspecsuite/log.go b/cmd/hclspecsuite/log.go index d5b5ae5..30c27b9 100644 --- a/cmd/hclspecsuite/log.go +++ b/cmd/hclspecsuite/log.go @@ -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) diff --git a/cmd/hclspecsuite/main.go b/cmd/hclspecsuite/main.go index 4db5119..2ba4982 100644 --- a/cmd/hclspecsuite/main.go +++ b/cmd/hclspecsuite/main.go @@ -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() { diff --git a/cmd/hclspecsuite/runner.go b/cmd/hclspecsuite/runner.go index b5a309c..856827d 100644 --- a/cmd/hclspecsuite/runner.go +++ b/cmd/hclspecsuite/runner.go @@ -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 { diff --git a/cmd/hclspecsuite/test_file.go b/cmd/hclspecsuite/test_file.go index cdb384a..52175aa 100644 --- a/cmd/hclspecsuite/test_file.go +++ b/cmd/hclspecsuite/test_file.go @@ -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 { diff --git a/cmd/hclspecsuite/traversals.go b/cmd/hclspecsuite/traversals.go index 160d5b7..98db5a6 100644 --- a/cmd/hclspecsuite/traversals.go +++ b/cmd/hclspecsuite/traversals.go @@ -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 { diff --git a/ext/dynblock/expand_body.go b/ext/dynblock/expand_body.go index dd30822..cf83637 100644 --- a/ext/dynblock/expand_body.go +++ b/ext/dynblock/expand_body.go @@ -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" ) diff --git a/ext/dynblock/expand_body_test.go b/ext/dynblock/expand_body_test.go index 350dbe3..074600b 100644 --- a/ext/dynblock/expand_body_test.go +++ b/ext/dynblock/expand_body_test.go @@ -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" ) diff --git a/ext/dynblock/expand_spec.go b/ext/dynblock/expand_spec.go index 41c0be2..e64a6e3 100644 --- a/ext/dynblock/expand_spec.go +++ b/ext/dynblock/expand_spec.go @@ -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" ) diff --git a/ext/dynblock/expr_wrap.go b/ext/dynblock/expr_wrap.go index 6916fc1..250fb45 100644 --- a/ext/dynblock/expr_wrap.go +++ b/ext/dynblock/expr_wrap.go @@ -1,7 +1,7 @@ package dynblock import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/ext/dynblock/iteration.go b/ext/dynblock/iteration.go index 7056d33..0967659 100644 --- a/ext/dynblock/iteration.go +++ b/ext/dynblock/iteration.go @@ -1,7 +1,7 @@ package dynblock import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/ext/dynblock/public.go b/ext/dynblock/public.go index b7e8ca9..7ae7085 100644 --- a/ext/dynblock/public.go +++ b/ext/dynblock/public.go @@ -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 diff --git a/ext/dynblock/schema.go b/ext/dynblock/schema.go index dc8ed5a..77d6044 100644 --- a/ext/dynblock/schema.go +++ b/ext/dynblock/schema.go @@ -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", diff --git a/ext/dynblock/unknown_body.go b/ext/dynblock/unknown_body.go index 932f6a3..2addbc6 100644 --- a/ext/dynblock/unknown_body.go +++ b/ext/dynblock/unknown_body.go @@ -1,7 +1,7 @@ package dynblock import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/ext/dynblock/variables.go b/ext/dynblock/variables.go index ad838f3..658c478 100644 --- a/ext/dynblock/variables.go +++ b/ext/dynblock/variables.go @@ -1,7 +1,7 @@ package dynblock import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/ext/dynblock/variables_hcldec.go b/ext/dynblock/variables_hcldec.go index a078d91..ec3588f 100644 --- a/ext/dynblock/variables_hcldec.go +++ b/ext/dynblock/variables_hcldec.go @@ -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 diff --git a/ext/dynblock/variables_test.go b/ext/dynblock/variables_test.go index 5b4f492..209737a 100644 --- a/ext/dynblock/variables_test.go +++ b/ext/dynblock/variables_test.go @@ -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) { diff --git a/ext/include/file_resolver.go b/ext/include/file_resolver.go index c79a094..382c6d4 100644 --- a/ext/include/file_resolver.go +++ b/ext/include/file_resolver.go @@ -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 diff --git a/ext/include/map_resolver.go b/ext/include/map_resolver.go index 31770b7..b1da3df 100644 --- a/ext/include/map_resolver.go +++ b/ext/include/map_resolver.go @@ -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 diff --git a/ext/include/resolver.go b/ext/include/resolver.go index c477c1f..b1c957a 100644 --- a/ext/include/resolver.go +++ b/ext/include/resolver.go @@ -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 diff --git a/ext/include/transformer.go b/ext/include/transformer.go index 15c513f..a76e7f6 100644 --- a/ext/include/transformer.go +++ b/ext/include/transformer.go @@ -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 diff --git a/ext/include/transformer_test.go b/ext/include/transformer_test.go index fba73fe..71d7a2f 100644 --- a/ext/include/transformer_test.go +++ b/ext/include/transformer_test.go @@ -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" ) diff --git a/ext/transform/error.go b/ext/transform/error.go index d7de418..f35c304 100644 --- a/ext/transform/error.go +++ b/ext/transform/error.go @@ -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 diff --git a/ext/transform/transform.go b/ext/transform/transform.go index 30e9eed..ad99b8d 100644 --- a/ext/transform/transform.go +++ b/ext/transform/transform.go @@ -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 diff --git a/ext/transform/transform_test.go b/ext/transform/transform_test.go index 53c6397..07a09ef 100644 --- a/ext/transform/transform_test.go +++ b/ext/transform/transform_test.go @@ -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" ) diff --git a/ext/transform/transformer.go b/ext/transform/transformer.go index 7a00d3a..2950926 100644 --- a/ext/transform/transformer.go +++ b/ext/transform/transformer.go @@ -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) diff --git a/ext/typeexpr/README.md b/ext/typeexpr/README.md index ff2b3f2..ec70947 100644 --- a/ext/typeexpr/README.md +++ b/ext/typeexpr/README.md @@ -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://godoc.org/github.com/hashicorp/hcl2/ext/typeexpr). +For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl/v2/ext/typeexpr). ## Type Expression Syntax diff --git a/ext/typeexpr/get_type.go b/ext/typeexpr/get_type.go index a84338a..581288b 100644 --- a/ext/typeexpr/get_type.go +++ b/ext/typeexpr/get_type.go @@ -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" ) diff --git a/ext/typeexpr/get_type_test.go b/ext/typeexpr/get_type_test.go index 0198ea0..bb40c24 100644 --- a/ext/typeexpr/get_type_test.go +++ b/ext/typeexpr/get_type_test.go @@ -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" ) diff --git a/ext/typeexpr/public.go b/ext/typeexpr/public.go index e3f5eef..0deedcb 100644 --- a/ext/typeexpr/public.go +++ b/ext/typeexpr/public.go @@ -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" ) diff --git a/ext/userfunc/README.md b/ext/userfunc/README.md index 4f9d343..5d38046 100644 --- a/ext/userfunc/README.md +++ b/ext/userfunc/README.md @@ -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://godoc.org/github.com/hashicorp/hcl2/ext/userfunc). +For more information, see [the godoc reference](http://godoc.org/github.com/hashicorp/hcl/v2/ext/userfunc). diff --git a/ext/userfunc/decode.go b/ext/userfunc/decode.go index 2f3ce64..73f4336 100644 --- a/ext/userfunc/decode.go +++ b/ext/userfunc/decode.go @@ -1,7 +1,7 @@ package userfunc import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" ) diff --git a/ext/userfunc/decode_test.go b/ext/userfunc/decode_test.go index 039beba..d22abb8 100644 --- a/ext/userfunc/decode_test.go +++ b/ext/userfunc/decode_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/ext/userfunc/public.go b/ext/userfunc/public.go index 866cea0..626a18c 100644 --- a/ext/userfunc/public.go +++ b/ext/userfunc/public.go @@ -1,7 +1,7 @@ package userfunc import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty/function" ) diff --git a/go.mod b/go.mod index 38e1460..fb4d220 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,9 @@ -// WARNING: This module will move to a new path when it transitions from -// being "experimental" to being released. -module github.com/hashicorp/hcl2 +module github.com/hashicorp/hcl/v2 require ( github.com/agext/levenshtein v1.2.1 github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 github.com/apparentlymart/go-textseg v1.0.0 - github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e github.com/davecgh/go-spew v1.1.1 github.com/go-test/deep v1.0.3 github.com/google/go-cmp v0.2.0 @@ -15,16 +12,12 @@ require ( github.com/kr/pretty v0.1.0 github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 - github.com/onsi/ginkgo v1.7.0 // indirect - github.com/onsi/gomega v1.4.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sergi/go-diff v1.0.0 github.com/spf13/pflag v1.0.2 github.com/stretchr/testify v1.2.2 // indirect github.com/zclconf/go-cty v1.0.0 golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 - golang.org/x/net v0.0.0-20190502183928-7f726cade0ab // indirect - golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect golang.org/x/text v0.3.2 // indirect gopkg.in/yaml.v2 v2.2.2 diff --git a/go.sum b/go.sum index 1352f03..f462d1e 100644 --- a/go.sum +++ b/go.sum @@ -4,25 +4,17 @@ github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhi github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e h1:D64GF/Xr5zSUnM3q1Jylzo4sK7szhP/ON+nb2DB5XJA= -github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 h1:Rem2+U35z1QtPQc6r+WolF7yXiefXqDKyk+lN2pE164= github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0 h1:j30noezaCfvNLcdMYSvHLv81DxYRSt1grlpseG67vhU= github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -33,11 +25,6 @@ github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3v github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= @@ -53,15 +40,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734 h1:p/H982KKEjUnLJkM3tt/LemDnOc1GiZL5FCVlORJ5zo= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190502183928-7f726cade0ab h1:9RfW3ktsOZxgo9YNbBAjq1FWzc/igwEcUzZz8IXgSbk= -golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dzugGxJ/SQHoNufZJq1w= @@ -75,10 +55,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/gohcl/decode.go b/gohcl/decode.go index 3a149a8..e291e0a 100644 --- a/gohcl/decode.go +++ b/gohcl/decode.go @@ -6,7 +6,7 @@ import ( "github.com/zclconf/go-cty/cty" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty/convert" "github.com/zclconf/go-cty/cty/gocty" ) diff --git a/gohcl/decode_test.go b/gohcl/decode_test.go index 896b022..0fc18ae 100644 --- a/gohcl/decode_test.go +++ b/gohcl/decode_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/hcl2/hcl" - hclJSON "github.com/hashicorp/hcl2/hcl/json" + "github.com/hashicorp/hcl/v2/hcl" + hclJSON "github.com/hashicorp/hcl/v2/hcl/json" "github.com/zclconf/go-cty/cty" ) diff --git a/gohcl/encode.go b/gohcl/encode.go index 3cbf7e4..d612e09 100644 --- a/gohcl/encode.go +++ b/gohcl/encode.go @@ -5,7 +5,7 @@ import ( "reflect" "sort" - "github.com/hashicorp/hcl2/hclwrite" + "github.com/hashicorp/hcl/v2/hclwrite" "github.com/zclconf/go-cty/cty/gocty" ) diff --git a/gohcl/encode_test.go b/gohcl/encode_test.go index 97515d4..9778df7 100644 --- a/gohcl/encode_test.go +++ b/gohcl/encode_test.go @@ -3,8 +3,8 @@ package gohcl_test import ( "fmt" - "github.com/hashicorp/hcl2/gohcl" - "github.com/hashicorp/hcl2/hclwrite" + "github.com/hashicorp/hcl/v2/gohcl" + "github.com/hashicorp/hcl/v2/hclwrite" ) func ExampleEncodeIntoBody() { diff --git a/gohcl/schema.go b/gohcl/schema.go index 88164cb..6e4bb75 100644 --- a/gohcl/schema.go +++ b/gohcl/schema.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // ImpliedBodySchema produces a hcl.BodySchema derived from the type of the diff --git a/gohcl/schema_test.go b/gohcl/schema_test.go index 7b5dbea..ca4adef 100644 --- a/gohcl/schema_test.go +++ b/gohcl/schema_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestImpliedBodySchema(t *testing.T) { diff --git a/gohcl/types.go b/gohcl/types.go index a94f275..14d4a00 100644 --- a/gohcl/types.go +++ b/gohcl/types.go @@ -3,7 +3,7 @@ package gohcl import ( "reflect" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) var victimExpr hcl.Expression diff --git a/guide/go_decoding_gohcl.rst b/guide/go_decoding_gohcl.rst index 1a0d6e7..7ef2126 100644 --- a/guide/go_decoding_gohcl.rst +++ b/guide/go_decoding_gohcl.rst @@ -53,7 +53,7 @@ which case ``nil`` is written to indicate the absense of the argument. The sections below discuss some additional decoding use-cases. For full details on the `gohcl` package, see -`the godoc reference `_. +`the godoc reference `_. .. _go-decoding-gohcl-evalcontext: diff --git a/guide/go_decoding_hcldec.rst b/guide/go_decoding_hcldec.rst index db0e874..f05b926 100644 --- a/guide/go_decoding_hcldec.rst +++ b/guide/go_decoding_hcldec.rst @@ -22,7 +22,7 @@ dynamically-typed data structures. The sections below are an overview of the main parts of package ``hcldec``. For full details, see -`the package godoc `_. +`the package godoc `_. .. _`HashiCorp Terraform`: https://www.terraform.io/ diff --git a/guide/go_decoding_lowlevel.rst b/guide/go_decoding_lowlevel.rst index 0f9662a..e0b5e99 100644 --- a/guide/go_decoding_lowlevel.rst +++ b/guide/go_decoding_lowlevel.rst @@ -34,7 +34,7 @@ to the more detailed information where needed while using the higher-level APIs for the more straightforward portions of a configuration language. The following subsections will give an overview of the low-level API. For full -details, see `the godoc reference `_. +details, see `the godoc reference `_. Structural Decoding ------------------- diff --git a/guide/go_parsing.rst b/guide/go_parsing.rst index 064bdee..77345fc 100644 --- a/guide/go_parsing.rst +++ b/guide/go_parsing.rst @@ -61,4 +61,4 @@ Package ``hclparse`` The above list just highlights the main functions in this package. For full documentation, see -`the hclparse godoc `_. +`the hclparse godoc `_. diff --git a/hcl/hclsyntax/diagnostics.go b/hcl/hclsyntax/diagnostics.go index 94eaf58..0303668 100644 --- a/hcl/hclsyntax/diagnostics.go +++ b/hcl/hclsyntax/diagnostics.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // setDiagEvalContext is an internal helper that will impose a particular diff --git a/hcl/hclsyntax/expression.go b/hcl/hclsyntax/expression.go index d3f7a74..944f2aa 100644 --- a/hcl/hclsyntax/expression.go +++ b/hcl/hclsyntax/expression.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" "github.com/zclconf/go-cty/cty/function" diff --git a/hcl/hclsyntax/expression_ops.go b/hcl/hclsyntax/expression_ops.go index 7f59f1a..9468ce5 100644 --- a/hcl/hclsyntax/expression_ops.go +++ b/hcl/hclsyntax/expression_ops.go @@ -3,7 +3,7 @@ package hclsyntax 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" "github.com/zclconf/go-cty/cty/function" diff --git a/hcl/hclsyntax/expression_static_test.go b/hcl/hclsyntax/expression_static_test.go index 18d5f79..e9ab35e 100644 --- a/hcl/hclsyntax/expression_static_test.go +++ b/hcl/hclsyntax/expression_static_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/expression_template.go b/hcl/hclsyntax/expression_template.go index ca3dae1..68086d3 100644 --- a/hcl/hclsyntax/expression_template.go +++ b/hcl/hclsyntax/expression_template.go @@ -4,7 +4,7 @@ import ( "bytes" "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" ) diff --git a/hcl/hclsyntax/expression_template_test.go b/hcl/hclsyntax/expression_template_test.go index 245150d..2f194fe 100644 --- a/hcl/hclsyntax/expression_template_test.go +++ b/hcl/hclsyntax/expression_template_test.go @@ -3,7 +3,7 @@ package hclsyntax import ( "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/expression_test.go b/hcl/hclsyntax/expression_test.go index 1f6366b..710f01f 100644 --- a/hcl/hclsyntax/expression_test.go +++ b/hcl/hclsyntax/expression_test.go @@ -3,7 +3,7 @@ package hclsyntax import ( "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" "github.com/zclconf/go-cty/cty/function/stdlib" diff --git a/hcl/hclsyntax/expression_vars.go b/hcl/hclsyntax/expression_vars.go index 9177092..4d5ddba 100755 --- a/hcl/hclsyntax/expression_vars.go +++ b/hcl/hclsyntax/expression_vars.go @@ -4,7 +4,7 @@ package hclsyntax // Run 'go generate' on this package to update the set of functions here. import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func (e *AnonSymbolExpr) Variables() []hcl.Traversal { diff --git a/hcl/hclsyntax/expression_vars_gen.go b/hcl/hclsyntax/expression_vars_gen.go index 88f1980..3279052 100644 --- a/hcl/hclsyntax/expression_vars_gen.go +++ b/hcl/hclsyntax/expression_vars_gen.go @@ -89,7 +89,7 @@ const outputPreamble = `package hclsyntax // Run 'go generate' on this package to update the set of functions here. import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" )` const outputMethodFmt = ` diff --git a/hcl/hclsyntax/file.go b/hcl/hclsyntax/file.go index 490c025..5f07e76 100644 --- a/hcl/hclsyntax/file.go +++ b/hcl/hclsyntax/file.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // File is the top-level object resulting from parsing a configuration file. diff --git a/hcl/hclsyntax/fuzz/Makefile b/hcl/hclsyntax/fuzz/Makefile index f5274f9..3b3d560 100644 --- a/hcl/hclsyntax/fuzz/Makefile +++ b/hcl/hclsyntax/fuzz/Makefile @@ -15,7 +15,7 @@ fuzz-exec-%: fuzz%-fuzz.zip go-fuzz -bin=./fuzz$*-fuzz.zip -workdir=$(FUZZ_WORK_DIR) fuzz%-fuzz.zip: %/fuzz.go - go-fuzz-build github.com/hashicorp/hcl2/hcl/hclsyntax/fuzz/$* + go-fuzz-build github.com/hashicorp/hcl/v2/hcl/hclsyntax/fuzz/$* tools: go get -u github.com/dvyukov/go-fuzz/go-fuzz diff --git a/hcl/hclsyntax/fuzz/config/fuzz.go b/hcl/hclsyntax/fuzz/config/fuzz.go index 3e670a6..f787b5a 100644 --- a/hcl/hclsyntax/fuzz/config/fuzz.go +++ b/hcl/hclsyntax/fuzz/config/fuzz.go @@ -1,8 +1,8 @@ package fuzzconfig import ( - "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 Fuzz(data []byte) int { diff --git a/hcl/hclsyntax/fuzz/expr/fuzz.go b/hcl/hclsyntax/fuzz/expr/fuzz.go index 526bfaa..3b219f6 100644 --- a/hcl/hclsyntax/fuzz/expr/fuzz.go +++ b/hcl/hclsyntax/fuzz/expr/fuzz.go @@ -1,8 +1,8 @@ package fuzzexpr import ( - "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 Fuzz(data []byte) int { diff --git a/hcl/hclsyntax/fuzz/template/fuzz.go b/hcl/hclsyntax/fuzz/template/fuzz.go index e2cbc74..5ae8643 100644 --- a/hcl/hclsyntax/fuzz/template/fuzz.go +++ b/hcl/hclsyntax/fuzz/template/fuzz.go @@ -1,8 +1,8 @@ package fuzztemplate import ( - "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 Fuzz(data []byte) int { diff --git a/hcl/hclsyntax/fuzz/traversal/fuzz.go b/hcl/hclsyntax/fuzz/traversal/fuzz.go index 30fe4a7..d175449 100644 --- a/hcl/hclsyntax/fuzz/traversal/fuzz.go +++ b/hcl/hclsyntax/fuzz/traversal/fuzz.go @@ -1,8 +1,8 @@ package fuzztraversal import ( - "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 Fuzz(data []byte) int { diff --git a/hcl/hclsyntax/navigation.go b/hcl/hclsyntax/navigation.go index c8c97f3..c752e94 100644 --- a/hcl/hclsyntax/navigation.go +++ b/hcl/hclsyntax/navigation.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) type navigation struct { diff --git a/hcl/hclsyntax/navigation_test.go b/hcl/hclsyntax/navigation_test.go index 5d300b4..61a057c 100644 --- a/hcl/hclsyntax/navigation_test.go +++ b/hcl/hclsyntax/navigation_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestNavigationContextString(t *testing.T) { diff --git a/hcl/hclsyntax/node.go b/hcl/hclsyntax/node.go index 75812e6..447f895 100644 --- a/hcl/hclsyntax/node.go +++ b/hcl/hclsyntax/node.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // Node is the abstract type that every AST node implements. diff --git a/hcl/hclsyntax/parse_traversal_test.go b/hcl/hclsyntax/parse_traversal_test.go index f581b6b..bf074f7 100644 --- a/hcl/hclsyntax/parse_traversal_test.go +++ b/hcl/hclsyntax/parse_traversal_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/parser.go b/hcl/hclsyntax/parser.go index 772ebae..89d1554 100644 --- a/hcl/hclsyntax/parser.go +++ b/hcl/hclsyntax/parser.go @@ -7,7 +7,7 @@ import ( "unicode/utf8" "github.com/apparentlymart/go-textseg/textseg" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/parser_template.go b/hcl/hclsyntax/parser_template.go index a141626..1a05c99 100644 --- a/hcl/hclsyntax/parser_template.go +++ b/hcl/hclsyntax/parser_template.go @@ -6,7 +6,7 @@ import ( "unicode" "github.com/apparentlymart/go-textseg/textseg" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/parser_test.go b/hcl/hclsyntax/parser_test.go index 79f8421..3a217c2 100644 --- a/hcl/hclsyntax/parser_test.go +++ b/hcl/hclsyntax/parser_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/parser_traversal.go b/hcl/hclsyntax/parser_traversal.go index 2ff3ed6..127a373 100644 --- a/hcl/hclsyntax/parser_traversal.go +++ b/hcl/hclsyntax/parser_traversal.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/peeker.go b/hcl/hclsyntax/peeker.go index 5a4b50e..7e1b7d5 100644 --- a/hcl/hclsyntax/peeker.go +++ b/hcl/hclsyntax/peeker.go @@ -7,7 +7,7 @@ import ( "runtime" "strings" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // This is set to true at init() time in tests, to enable more useful output diff --git a/hcl/hclsyntax/public.go b/hcl/hclsyntax/public.go index cf0ee29..4081090 100644 --- a/hcl/hclsyntax/public.go +++ b/hcl/hclsyntax/public.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // ParseConfig parses the given buffer as a whole HCL config file, returning diff --git a/hcl/hclsyntax/scan_tokens.go b/hcl/hclsyntax/scan_tokens.go index 581e35e..6601341 100644 --- a/hcl/hclsyntax/scan_tokens.go +++ b/hcl/hclsyntax/scan_tokens.go @@ -5,7 +5,7 @@ package hclsyntax import ( "bytes" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // This file is generated from scan_tokens.rl. DO NOT EDIT. diff --git a/hcl/hclsyntax/scan_tokens.rl b/hcl/hclsyntax/scan_tokens.rl index 4443dc4..05fff9d 100644 --- a/hcl/hclsyntax/scan_tokens.rl +++ b/hcl/hclsyntax/scan_tokens.rl @@ -4,7 +4,7 @@ package hclsyntax import ( "bytes" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // This file is generated from scan_tokens.rl. DO NOT EDIT. diff --git a/hcl/hclsyntax/scan_tokens_test.go b/hcl/hclsyntax/scan_tokens_test.go index efbdbce..db5866b 100644 --- a/hcl/hclsyntax/scan_tokens_test.go +++ b/hcl/hclsyntax/scan_tokens_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestScanTokens_normal(t *testing.T) { diff --git a/hcl/hclsyntax/structure.go b/hcl/hclsyntax/structure.go index 476025d..4bf21e4 100644 --- a/hcl/hclsyntax/structure.go +++ b/hcl/hclsyntax/structure.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // AsHCLBlock returns the block data expressed as a *hcl.Block. diff --git a/hcl/hclsyntax/structure_at_pos.go b/hcl/hclsyntax/structure_at_pos.go index d8f023b..77e6294 100644 --- a/hcl/hclsyntax/structure_at_pos.go +++ b/hcl/hclsyntax/structure_at_pos.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // ----------------------------------------------------------------------------- diff --git a/hcl/hclsyntax/structure_at_pos_test.go b/hcl/hclsyntax/structure_at_pos_test.go index 2d8d910..d3788ed 100644 --- a/hcl/hclsyntax/structure_at_pos_test.go +++ b/hcl/hclsyntax/structure_at_pos_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestBlocksAtPos(t *testing.T) { diff --git a/hcl/hclsyntax/structure_test.go b/hcl/hclsyntax/structure_test.go index 551f0f1..80e0de6 100644 --- a/hcl/hclsyntax/structure_test.go +++ b/hcl/hclsyntax/structure_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/kylelemons/godebug/pretty" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/token.go b/hcl/hclsyntax/token.go index 3d898fd..27901e7 100644 --- a/hcl/hclsyntax/token.go +++ b/hcl/hclsyntax/token.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/apparentlymart/go-textseg/textseg" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // Token represents a sequence of bytes from some HCL code that has been diff --git a/hcl/hclsyntax/variables.go b/hcl/hclsyntax/variables.go index 91f417f..74be757 100644 --- a/hcl/hclsyntax/variables.go +++ b/hcl/hclsyntax/variables.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // Variables returns all of the variables referenced within a given experssion. diff --git a/hcl/hclsyntax/variables_test.go b/hcl/hclsyntax/variables_test.go index 5795261..17e72fc 100644 --- a/hcl/hclsyntax/variables_test.go +++ b/hcl/hclsyntax/variables_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/kr/pretty" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/hclsyntax/walk.go b/hcl/hclsyntax/walk.go index 90f81c9..494177f 100644 --- a/hcl/hclsyntax/walk.go +++ b/hcl/hclsyntax/walk.go @@ -1,7 +1,7 @@ package hclsyntax import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // VisitFunc is the callback signature for VisitAll. diff --git a/hcl/hclsyntax/walk_test.go b/hcl/hclsyntax/walk_test.go index d6085b9..ae0ff94 100644 --- a/hcl/hclsyntax/walk_test.go +++ b/hcl/hclsyntax/walk_test.go @@ -8,7 +8,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestWalk(t *testing.T) { diff --git a/hcl/integrationtest/terraformlike_test.go b/hcl/integrationtest/terraformlike_test.go index c42a4d0..40cce96 100644 --- a/hcl/integrationtest/terraformlike_test.go +++ b/hcl/integrationtest/terraformlike_test.go @@ -6,12 +6,12 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/hcl2/ext/dynblock" - "github.com/hashicorp/hcl2/gohcl" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" - "github.com/hashicorp/hcl2/hcl/json" - "github.com/hashicorp/hcl2/hcldec" + "github.com/hashicorp/hcl/v2/ext/dynblock" + "github.com/hashicorp/hcl/v2/gohcl" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/json" + "github.com/hashicorp/hcl/v2/hcldec" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/json/ast.go b/hcl/json/ast.go index 753bfa0..d90c107 100644 --- a/hcl/json/ast.go +++ b/hcl/json/ast.go @@ -3,7 +3,7 @@ package json import ( "math/big" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) type node interface { diff --git a/hcl/json/fuzz/Makefile b/hcl/json/fuzz/Makefile index 2745616..1874772 100644 --- a/hcl/json/fuzz/Makefile +++ b/hcl/json/fuzz/Makefile @@ -12,7 +12,7 @@ fuzz-exec-%: fuzz%-fuzz.zip go-fuzz -bin=./fuzz$*-fuzz.zip -workdir=$(FUZZ_WORK_DIR) fuzz%-fuzz.zip: %/fuzz.go - go-fuzz-build github.com/hashicorp/hcl2/hcl/json/fuzz/$* + go-fuzz-build github.com/hashicorp/hcl/v2/hcl/json/fuzz/$* tools: go get -u github.com/dvyukov/go-fuzz/go-fuzz diff --git a/hcl/json/fuzz/config/fuzz.go b/hcl/json/fuzz/config/fuzz.go index 3455974..37618ff 100644 --- a/hcl/json/fuzz/config/fuzz.go +++ b/hcl/json/fuzz/config/fuzz.go @@ -1,7 +1,7 @@ package fuzzconfig import ( - "github.com/hashicorp/hcl2/hcl/json" + "github.com/hashicorp/hcl/v2/hcl/json" ) func Fuzz(data []byte) int { diff --git a/hcl/json/parser.go b/hcl/json/parser.go index d368ea8..6cee32a 100644 --- a/hcl/json/parser.go +++ b/hcl/json/parser.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/json/parser_test.go b/hcl/json/parser_test.go index bad7c01..7e8c058 100644 --- a/hcl/json/parser_test.go +++ b/hcl/json/parser_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func init() { diff --git a/hcl/json/public.go b/hcl/json/public.go index 2728aa1..2cfaa8f 100644 --- a/hcl/json/public.go +++ b/hcl/json/public.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "os" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // Parse attempts to parse the given buffer as JSON and, if successful, returns diff --git a/hcl/json/public_test.go b/hcl/json/public_test.go index b23fd7d..5918075 100644 --- a/hcl/json/public_test.go +++ b/hcl/json/public_test.go @@ -3,7 +3,7 @@ package json import ( "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/json/scanner.go b/hcl/json/scanner.go index da72884..a960512 100644 --- a/hcl/json/scanner.go +++ b/hcl/json/scanner.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/apparentlymart/go-textseg/textseg" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) //go:generate stringer -type tokenType scanner.go diff --git a/hcl/json/scanner_test.go b/hcl/json/scanner_test.go index 23650c5..1bff979 100644 --- a/hcl/json/scanner_test.go +++ b/hcl/json/scanner_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) func TestScan(t *testing.T) { diff --git a/hcl/json/structure.go b/hcl/json/structure.go index 74847c7..db1826a 100644 --- a/hcl/json/structure.go +++ b/hcl/json/structure.go @@ -3,8 +3,8 @@ package json import ( "fmt" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) diff --git a/hcl/json/structure_test.go b/hcl/json/structure_test.go index 86cabcd..8a89ac1 100644 --- a/hcl/json/structure_test.go +++ b/hcl/json/structure_test.go @@ -8,7 +8,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/go-test/deep" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcl/spectests/spec_test.go b/hcl/spectests/spec_test.go index 81964ea..f48fae0 100644 --- a/hcl/spectests/spec_test.go +++ b/hcl/spectests/spec_test.go @@ -28,12 +28,12 @@ func TestMain(m *testing.M) { } func build() error { - err := goBuild("github.com/hashicorp/hcl2/cmd/hcldec", "tmp_hcldec") + err := goBuild("github.com/hashicorp/hcl/v2/cmd/hcldec", "tmp_hcldec") if err != nil { return fmt.Errorf("error building hcldec: %s", err) } - err = goBuild("github.com/hashicorp/hcl2/cmd/hclspecsuite", "tmp_hclspecsuite") + err = goBuild("github.com/hashicorp/hcl/v2/cmd/hclspecsuite", "tmp_hclspecsuite") if err != nil { return fmt.Errorf("error building hcldec: %s", err) } diff --git a/hcldec/block_labels.go b/hcldec/block_labels.go index 7e652e9..a83798e 100644 --- a/hcldec/block_labels.go +++ b/hcldec/block_labels.go @@ -1,7 +1,7 @@ package hcldec import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) type blockLabel struct { diff --git a/hcldec/decode.go b/hcldec/decode.go index 6cf93fe..372de2d 100644 --- a/hcldec/decode.go +++ b/hcldec/decode.go @@ -1,7 +1,7 @@ package hcldec import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcldec/public.go b/hcldec/public.go index 3c80363..ff70e85 100644 --- a/hcldec/public.go +++ b/hcldec/public.go @@ -1,7 +1,7 @@ package hcldec import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hcldec/public_test.go b/hcldec/public_test.go index 7ba2cd6..0b7638b 100644 --- a/hcldec/public_test.go +++ b/hcldec/public_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hcldec/schema.go b/hcldec/schema.go index b57bd96..03fb1df 100644 --- a/hcldec/schema.go +++ b/hcldec/schema.go @@ -1,7 +1,7 @@ package hcldec import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // ImpliedSchema returns the *hcl.BodySchema implied by the given specification. diff --git a/hcldec/spec.go b/hcldec/spec.go index f9da7f6..8c55b4a 100644 --- a/hcldec/spec.go +++ b/hcldec/spec.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" "github.com/zclconf/go-cty/cty/function" diff --git a/hcldec/spec_test.go b/hcldec/spec_test.go index 6a80a9d..c51c63a 100644 --- a/hcldec/spec_test.go +++ b/hcldec/spec_test.go @@ -7,8 +7,8 @@ import ( "github.com/apparentlymart/go-dump/dump" "github.com/zclconf/go-cty/cty" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) // Verify that all of our spec types implement the necessary interfaces diff --git a/hcldec/variables.go b/hcldec/variables.go index 7662516..44e5316 100644 --- a/hcldec/variables.go +++ b/hcldec/variables.go @@ -1,7 +1,7 @@ package hcldec import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // Variables processes the given body with the given spec and returns a diff --git a/hcldec/variables_test.go b/hcldec/variables_test.go index 5258ea4..b99b648 100644 --- a/hcldec/variables_test.go +++ b/hcldec/variables_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hcled/navigation.go b/hcled/navigation.go index 5d10cd8..fd402a6 100644 --- a/hcled/navigation.go +++ b/hcled/navigation.go @@ -1,7 +1,7 @@ package hcled import ( - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) type contextStringer interface { diff --git a/hclparse/parser.go b/hclparse/parser.go index 6d47f12..d1f2f4c 100644 --- a/hclparse/parser.go +++ b/hclparse/parser.go @@ -4,9 +4,9 @@ import ( "fmt" "io/ioutil" - "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" ) // NOTE: This is the public interface for parsing. The actual parsers are diff --git a/hcltest/mock.go b/hcltest/mock.go index 7124f45..dfad5de 100644 --- a/hcltest/mock.go +++ b/hcltest/mock.go @@ -3,9 +3,9 @@ package hcltest import ( "fmt" - "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" ) diff --git a/hcltest/mock_test.go b/hcltest/mock_test.go index 77f40ac..f926572 100644 --- a/hcltest/mock_test.go +++ b/hcltest/mock_test.go @@ -5,7 +5,7 @@ import ( "reflect" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/ast_attribute.go b/hclwrite/ast_attribute.go index 975fa74..677179c 100644 --- a/hclwrite/ast_attribute.go +++ b/hclwrite/ast_attribute.go @@ -1,7 +1,7 @@ package hclwrite import ( - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) type Attribute struct { diff --git a/hclwrite/ast_block.go b/hclwrite/ast_block.go index d5fd32b..b546de2 100644 --- a/hclwrite/ast_block.go +++ b/hclwrite/ast_block.go @@ -1,7 +1,7 @@ package hclwrite import ( - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/ast_body.go b/hclwrite/ast_body.go index cf69fee..f421662 100644 --- a/hclwrite/ast_body.go +++ b/hclwrite/ast_body.go @@ -1,8 +1,8 @@ package hclwrite import ( - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/ast_body_test.go b/hclwrite/ast_body_test.go index af114f8..3130ae5 100644 --- a/hclwrite/ast_body_test.go +++ b/hclwrite/ast_body_test.go @@ -7,8 +7,8 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/ast_expression.go b/hclwrite/ast_expression.go index 62d89fb..a1caa3a 100644 --- a/hclwrite/ast_expression.go +++ b/hclwrite/ast_expression.go @@ -3,8 +3,8 @@ package hclwrite import ( "fmt" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/examples_test.go b/hclwrite/examples_test.go index b58149d..4f00add 100644 --- a/hclwrite/examples_test.go +++ b/hclwrite/examples_test.go @@ -3,8 +3,8 @@ package hclwrite_test import ( "fmt" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hclwrite" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hclwrite" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/format.go b/hclwrite/format.go index 7111ebd..17dbd5e 100644 --- a/hclwrite/format.go +++ b/hclwrite/format.go @@ -1,7 +1,7 @@ package hclwrite import ( - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) var inKeyword = hclsyntax.Keyword([]byte{'i', 'n'}) diff --git a/hclwrite/format_test.go b/hclwrite/format_test.go index 7422769..948206d 100644 --- a/hclwrite/format_test.go +++ b/hclwrite/format_test.go @@ -7,7 +7,7 @@ import ( "reflect" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) func TestFormat(t *testing.T) { diff --git a/hclwrite/generate.go b/hclwrite/generate.go index d249cfd..5ec1dd1 100644 --- a/hclwrite/generate.go +++ b/hclwrite/generate.go @@ -5,8 +5,8 @@ import ( "unicode" "unicode/utf8" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/generate_test.go b/hclwrite/generate_test.go index 382a000..a8c215d 100644 --- a/hclwrite/generate_test.go +++ b/hclwrite/generate_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/native_node_sorter.go b/hclwrite/native_node_sorter.go index a13c0ec..28e740a 100644 --- a/hclwrite/native_node_sorter.go +++ b/hclwrite/native_node_sorter.go @@ -1,7 +1,7 @@ package hclwrite import ( - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) type nativeNodeSorter struct { diff --git a/hclwrite/parser.go b/hclwrite/parser.go index 0e8952d..a3cbe3d 100644 --- a/hclwrite/parser.go +++ b/hclwrite/parser.go @@ -4,8 +4,8 @@ import ( "fmt" "sort" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" "github.com/zclconf/go-cty/cty" ) diff --git a/hclwrite/parser_test.go b/hclwrite/parser_test.go index f40b1e4..c5d5228 100644 --- a/hclwrite/parser_test.go +++ b/hclwrite/parser_test.go @@ -11,8 +11,8 @@ import ( "github.com/kylelemons/godebug/pretty" - "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 TestParse(t *testing.T) { diff --git a/hclwrite/public.go b/hclwrite/public.go index 4d5ce2a..85f89ed 100644 --- a/hclwrite/public.go +++ b/hclwrite/public.go @@ -3,7 +3,7 @@ package hclwrite import ( "bytes" - "github.com/hashicorp/hcl2/hcl" + "github.com/hashicorp/hcl/v2/hcl" ) // NewFile creates a new file object that is empty and ready to have constructs diff --git a/hclwrite/round_trip_test.go b/hclwrite/round_trip_test.go index a498bba..8536bbd 100644 --- a/hclwrite/round_trip_test.go +++ b/hclwrite/round_trip_test.go @@ -9,8 +9,8 @@ import ( "github.com/zclconf/go-cty/cty/function" "github.com/zclconf/go-cty/cty/function/stdlib" - "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 TestRoundTripVerbatim(t *testing.T) { diff --git a/hclwrite/tokens.go b/hclwrite/tokens.go index d87f818..6707d89 100644 --- a/hclwrite/tokens.go +++ b/hclwrite/tokens.go @@ -5,8 +5,8 @@ import ( "io" "github.com/apparentlymart/go-textseg/textseg" - "github.com/hashicorp/hcl2/hcl" - "github.com/hashicorp/hcl2/hcl/hclsyntax" + "github.com/hashicorp/hcl/v2/hcl" + "github.com/hashicorp/hcl/v2/hcl/hclsyntax" ) // Token is a single sequence of bytes annotated with a type. It is similar diff --git a/specsuite/README.md b/specsuite/README.md index 0ad305e..3b6d88c 100644 --- a/specsuite/README.md +++ b/specsuite/README.md @@ -17,7 +17,7 @@ also exercise that implementation's own programmatic API. To run the suite, first build the harness using Go: ``` -go install github.com/hashicorp/hcl2/cmd/hclspecsuite +go install github.com/hashicorp/hcl/v2/cmd/hclspecsuite ``` Then run it, passing it the directory containing the test definitions (the