From f635033e3e953e74d67b76a520c9760786330af5 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Tue, 24 Jan 2017 23:43:28 +0000 Subject: Switch to scl, an extension of hcl --- vendor/github.com/homemade/scl/decode.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 vendor/github.com/homemade/scl/decode.go (limited to 'vendor/github.com/homemade/scl/decode.go') diff --git a/vendor/github.com/homemade/scl/decode.go b/vendor/github.com/homemade/scl/decode.go new file mode 100644 index 0000000..cb2b49e --- /dev/null +++ b/vendor/github.com/homemade/scl/decode.go @@ -0,0 +1,21 @@ +package scl + +import "github.com/hashicorp/hcl" + +/* +DecodeFile reads the given input file and decodes it into the structure given by `out`. +*/ +func DecodeFile(out interface{}, path string) error { + + parser, err := NewParser(NewDiskSystem()) + + if err != nil { + return err + } + + if err := parser.Parse(path); err != nil { + return err + } + + return hcl.Decode(out, parser.String()) +} -- cgit v1.2.3