Skip to content

Commit

Permalink
Unfold the "hcl" directory up into the root
Browse files Browse the repository at this point in the history
The main HCL package is more visible this way, and so it's easier than
having to pick it out from dozens of other package directories.
  • Loading branch information
apparentlymart committed Sep 9, 2019
1 parent 0f5ab3b commit 6c43446
Show file tree
Hide file tree
Showing 219 changed files with 166 additions and 154 deletions.
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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
)

type jsonDiagWriter struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/hashicorp/hcl/v2/hclparse"
flag "github.com/spf13/pflag"
Expand Down
2 changes: 1 addition & 1 deletion cmd/hcldec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/hcl/v2/ext/userfunc"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/hclfmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"strings"

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

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
ctyjson "github.com/zclconf/go-cty/cty/json"

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

Expand Down
2 changes: 1 addition & 1 deletion cmd/hclspecsuite/test_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

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

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

func findTraversalSpec(got hcl.Traversal, candidates []*TestFileExpectTraversal) *TestFileExpectTraversal {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

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

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

// 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/hcl/v2/hcl"
import "github.com/hashicorp/hcl/v2"

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions ext/dynblock/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

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

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

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

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

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

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

// A Resolver maps an include path (an arbitrary string, but usually something
Expand Down
2 changes: 1 addition & 1 deletion ext/include/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package include
import (
"github.com/hashicorp/hcl/v2/ext/transform"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
)

// Transformer builds a transformer that finds any "include" blocks in a body
Expand Down
2 changes: 1 addition & 1 deletion ext/include/transformer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
)

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

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

"reflect"

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

// A Transformer takes a given body, applies some (possibly no-op)
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/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
)

Expand Down
6 changes: 3 additions & 3 deletions ext/typeexpr/get_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"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"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/hcl/v2/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/hcl/v2/hcl/hclsyntax"
"github.com/hashicorp/hcl/v2/hclsyntax"

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

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

import (
"github.com/hashicorp/hcl/v2/hcl"
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/function"
)
Expand Down
4 changes: 2 additions & 2 deletions ext/userfunc/decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

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

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

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

Expand Down
6 changes: 1 addition & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/go-test/deep v1.0.3
github.com/google/go-cmp v0.2.0
github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 // indirect
github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0
github.com/hashicorp/hcl2 v0.0.0-20190909202536-66c59f909e25 // indirect
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/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/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/yaml.v2 v2.2.2
howett.net/plist v0.0.0-20181124034731-591f970eefbb
)
Loading

0 comments on commit 6c43446

Please sign in to comment.