aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/hil
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/hil
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/hashicorp/hil')
-rw-r--r--vendor/github.com/hashicorp/hil/convert.go19
-rw-r--r--vendor/github.com/hashicorp/hil/go.mod6
-rw-r--r--vendor/github.com/hashicorp/hil/go.sum4
3 files changed, 27 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/hil/convert.go b/vendor/github.com/hashicorp/hil/convert.go
index f2024d0..184e029 100644
--- a/vendor/github.com/hashicorp/hil/convert.go
+++ b/vendor/github.com/hashicorp/hil/convert.go
@@ -47,8 +47,23 @@ func hilMapstructureWeakDecode(m interface{}, rawVal interface{}) error {
47} 47}
48 48
49func InterfaceToVariable(input interface{}) (ast.Variable, error) { 49func InterfaceToVariable(input interface{}) (ast.Variable, error) {
50 if inputVariable, ok := input.(ast.Variable); ok { 50 if iv, ok := input.(ast.Variable); ok {
51 return inputVariable, nil 51 return iv, nil
52 }
53
54 // This is just to maintain backward compatibility
55 // after https://github.com/mitchellh/mapstructure/pull/98
56 if v, ok := input.([]ast.Variable); ok {
57 return ast.Variable{
58 Type: ast.TypeList,
59 Value: v,
60 }, nil
61 }
62 if v, ok := input.(map[string]ast.Variable); ok {
63 return ast.Variable{
64 Type: ast.TypeMap,
65 Value: v,
66 }, nil
52 } 67 }
53 68
54 var stringVal string 69 var stringVal string
diff --git a/vendor/github.com/hashicorp/hil/go.mod b/vendor/github.com/hashicorp/hil/go.mod
new file mode 100644
index 0000000..45719a6
--- /dev/null
+++ b/vendor/github.com/hashicorp/hil/go.mod
@@ -0,0 +1,6 @@
1module github.com/hashicorp/hil
2
3require (
4 github.com/mitchellh/mapstructure v1.1.2
5 github.com/mitchellh/reflectwalk v1.0.0
6)
diff --git a/vendor/github.com/hashicorp/hil/go.sum b/vendor/github.com/hashicorp/hil/go.sum
new file mode 100644
index 0000000..83639b6
--- /dev/null
+++ b/vendor/github.com/hashicorp/hil/go.sum
@@ -0,0 +1,4 @@
1github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
2github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
3github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
4github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=