Adjust import paths for hashicorp/hcl2 repo
This begins 'the great fork' of zcl to HCL.
This commit is contained in:
parent
523939034f
commit
c3ca111fff
@ -9,9 +9,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zclparse"
|
||||
"github.com/zclconf/go-zcl/zclwrite"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zclparse"
|
||||
"github.com/hashicorp/hcl2/zclwrite"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zclparse"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zclparse"
|
||||
)
|
||||
|
||||
// FileResolver creates and returns a Resolver that interprets include paths
|
||||
|
@ -3,7 +3,7 @@ package include
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// MapResolver returns a Resolver that consults the given map for preloaded
|
||||
|
@ -1,7 +1,7 @@
|
||||
package include
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// A Resolver maps an include path (an arbitrary string, but usually something
|
||||
|
@ -1,9 +1,9 @@
|
||||
package include
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/ext/transform"
|
||||
"github.com/zclconf/go-zcl/gozcl"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/ext/transform"
|
||||
"github.com/hashicorp/hcl2/gozcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Transformer builds a transformer that finds any "include" blocks in a body
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/gozcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcltest"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/gozcl"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcltest"
|
||||
)
|
||||
|
||||
func TestTransformer(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package transform
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// NewErrorBody returns a zcl.Body that returns the given diagnostics whenever
|
||||
|
@ -1,7 +1,7 @@
|
||||
package transform
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Shallow is equivalent to calling transformer.TransformBody(body), and
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
|
||||
"reflect"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcltest"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcltest"
|
||||
)
|
||||
|
||||
// Assert that deepWrapper implements Body
|
||||
|
@ -1,7 +1,7 @@
|
||||
package transform
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// A Transformer takes a given body, applies some (possibly no-op)
|
||||
|
@ -1,10 +1,10 @@
|
||||
package userfunc
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/hcl2/gozcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-zcl/gozcl"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
var funcBodySchema = &zcl.BodySchema{
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestDecodeUserFunctions(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package userfunc
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// A ContextFunc is a callback used to produce the base EvalContext for
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-cty/cty/gocty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// DecodeBody extracts the configuration within the given body into the given
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
zclJSON "github.com/zclconf/go-zcl/zcl/json"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
zclJSON "github.com/hashicorp/hcl2/zcl/json"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
)
|
||||
|
||||
func TestDecodeBody(t *testing.T) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// ImpliedBodySchema produces a zcl.BodySchema derived from the type of the
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func TestImpliedBodySchema(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package gozcl
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
var victimExpr zcl.Expression
|
||||
|
@ -3,9 +3,9 @@ package hclhil
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl"
|
||||
hclast "github.com/hashicorp/hcl/hcl/ast"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func parse(src []byte, filename string) (*zcl.File, zcl.Diagnostics) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Parse attempts to parse the given buffer as HCL with HIL expressions and,
|
||||
|
@ -1,9 +1,9 @@
|
||||
package hclhil
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
hclparser "github.com/hashicorp/hcl/hcl/parser"
|
||||
hcltoken "github.com/hashicorp/hcl/hcl/token"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
hilast "github.com/hashicorp/hil/ast"
|
||||
hilparser "github.com/hashicorp/hil/parser"
|
||||
)
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
|
||||
hclast "github.com/hashicorp/hcl/hcl/ast"
|
||||
hcltoken "github.com/hashicorp/hcl/hcl/token"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// body is our implementation of zcl.Body in terms of an HCL ObjectList
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
hclast "github.com/hashicorp/hcl/hcl/ast"
|
||||
hcltoken "github.com/hashicorp/hcl/hcl/token"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestBodyPartialContent(t *testing.T) {
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hil"
|
||||
hilast "github.com/hashicorp/hil/ast"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
)
|
||||
|
||||
func parseTemplate(src []byte, filename string, startPos zcl.Pos) (zcl.Expression, zcl.Diagnostics) {
|
||||
|
@ -3,10 +3,10 @@ package hclhil
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-cty/cty/function/stdlib"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestTemplateExpression(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package json
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
type node interface {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func parseFileContent(buf []byte, filename string) (node, zcl.Diagnostics) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Parse attempts to parse the given buffer as JSON and, if successful, returns
|
||||
|
@ -3,8 +3,8 @@ package json
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestParse_nonObject(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apparentlymart/go-textseg/textseg"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
//go:generate stringer -type tokenType scanner.go
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func TestScan(t *testing.T) {
|
||||
|
@ -3,10 +3,10 @@ package json
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/hclhil"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/hclhil"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
// body is the implementation of "Body" used for files processed with the JSON
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func TestBodyPartialContent(t *testing.T) {
|
||||
|
@ -3,10 +3,10 @@ package zclsyntax
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// Expression is the abstract type for nodes that behave as zcl expressions.
|
||||
|
@ -3,11 +3,11 @@ package zclsyntax
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-cty/cty/function/stdlib"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
type Operation struct {
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
type TemplateExpr struct {
|
||||
|
@ -3,8 +3,8 @@ package zclsyntax
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestTemplateExprParseAndValue(t *testing.T) {
|
||||
|
@ -3,10 +3,10 @@ package zclsyntax
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-cty/cty/function/stdlib"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestExpressionParseAndValue(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ package zclsyntax
|
||||
// Run 'go generate' on this package to update the set of functions here.
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
func (e *AnonSymbolExpr) Variables() []zcl.Traversal {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package zclsyntax
|
||||
|
||||
import "github.com/zclconf/go-zcl/zcl"
|
||||
import "github.com/hashicorp/hcl2/zcl"
|
||||
|
||||
// File is the top-level object resulting from parsing a configuration file.
|
||||
type File struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Node is the abstract type that every AST node implements.
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"reflect"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestParseTraversalAbs(t *testing.T) {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apparentlymart/go-textseg/textseg"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
type parser struct {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func (p *parser) ParseTemplate() (Expression, zcl.Diagnostics) {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/kylelemons/godebug/pretty"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestParseConfig(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// ParseTraversalAbs parses an absolute traversal that is assumed to consume
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
type peeker struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// ParseConfig parses the given buffer as a whole zcl config file, returning
|
||||
|
@ -4,7 +4,7 @@ package zclsyntax
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// This file is generated from scan_tokens.rl. DO NOT EDIT.
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/kylelemons/godebug/pretty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestScanTokens_normal(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// AsZCLBlock returns the block data expressed as a *zcl.Block.
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/kylelemons/godebug/pretty"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestBodyContent(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/apparentlymart/go-textseg/textseg"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Token represents a sequence of bytes from some zcl code that has been
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Variables returns all of the variables referenced within a given experssion.
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"reflect"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func TestVariables(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclsyntax
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// VisitFunc is the callback signature for VisitAll.
|
||||
|
@ -1,8 +1,8 @@
|
||||
package zcldec
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
func decode(body zcl.Body, block *zcl.Block, ctx *zcl.EvalContext, spec Spec, partial bool) (cty.Value, zcl.Body, zcl.Diagnostics) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package zcldec
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// Decode interprets the given body using the given specification and returns
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zcldec
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// ImpliedSchema returns the *zcl.BodySchema implied by the given specification.
|
||||
|
@ -3,9 +3,9 @@ package zcldec
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/convert"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// A Spec is a description of how to decode a zcl.Body to a cty.Value.
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zcldec
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// Variables processes the given body with the given spec and returns a
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestVariables(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zcled
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
type contextStringer interface {
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/hclhil"
|
||||
"github.com/zclconf/go-zcl/zcl/json"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/hclhil"
|
||||
"github.com/hashicorp/hcl2/zcl/json"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
// NOTE: This is the public interface for parsing. The actual parsers are
|
||||
|
@ -3,8 +3,8 @@ package zcltest
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
// MockBody returns a zcl.Body implementation that works in terms of a
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"reflect"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
var mockBodyIsBody zcl.Body = mockBody{}
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
)
|
||||
|
||||
type Node interface {
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestBodyFindAttribute(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclwrite
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
// placeholder token used when we don't have a token but we don't want
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"reflect"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestFormat(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package zclwrite
|
||||
|
||||
import (
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
type nativeNodeSorter struct {
|
||||
|
@ -3,8 +3,8 @@ package zclwrite
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
// Our "parser" here is actually not doing any parsing of its own. Instead,
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
"github.com/kylelemons/godebug/pretty"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package zclwrite
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
)
|
||||
|
||||
// ParseConfig interprets the given source bytes into a *zclwrite.File. The
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/hcl2/zcl"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
"github.com/zclconf/go-cty/cty/function"
|
||||
"github.com/zclconf/go-cty/cty/function/stdlib"
|
||||
"github.com/zclconf/go-zcl/zcl"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
func TestRoundTripVerbatim(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/apparentlymart/go-textseg/textseg"
|
||||
"github.com/zclconf/go-zcl/zcl/zclsyntax"
|
||||
"github.com/hashicorp/hcl2/zcl/zclsyntax"
|
||||
)
|
||||
|
||||
// TokenGen is an abstract type that can append tokens to a list. It is the
|
||||
|
Loading…
Reference in New Issue
Block a user