mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
Merge pull request #11100 from hashicorp/b-update-hcl
vendor: update HCL
This commit is contained in:
commit
dd1f930f4e
14
vendor/github.com/hashicorp/hcl/decoder.go
generated
vendored
14
vendor/github.com/hashicorp/hcl/decoder.go
generated
vendored
@ -91,7 +91,7 @@ func (d *decoder) decode(name string, node ast.Node, result reflect.Value) error
|
||||
return d.decodeBool(name, node, result)
|
||||
case reflect.Float64:
|
||||
return d.decodeFloat(name, node, result)
|
||||
case reflect.Int:
|
||||
case reflect.Int, reflect.Int32, reflect.Int64:
|
||||
return d.decodeInt(name, node, result)
|
||||
case reflect.Interface:
|
||||
// When we see an interface, we make our own thing
|
||||
@ -164,7 +164,11 @@ func (d *decoder) decodeInt(name string, node ast.Node, result reflect.Value) er
|
||||
return err
|
||||
}
|
||||
|
||||
result.Set(reflect.ValueOf(int(v)))
|
||||
if result.Kind() == reflect.Interface {
|
||||
result.Set(reflect.ValueOf(int(v)))
|
||||
} else {
|
||||
result.SetInt(v)
|
||||
}
|
||||
return nil
|
||||
case token.STRING:
|
||||
v, err := strconv.ParseInt(n.Token.Value().(string), 0, 0)
|
||||
@ -172,7 +176,11 @@ func (d *decoder) decodeInt(name string, node ast.Node, result reflect.Value) er
|
||||
return err
|
||||
}
|
||||
|
||||
result.Set(reflect.ValueOf(int(v)))
|
||||
if result.Kind() == reflect.Interface {
|
||||
result.Set(reflect.ValueOf(int(v)))
|
||||
} else {
|
||||
result.SetInt(v)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go
generated
vendored
2
vendor/github.com/hashicorp/hcl/hcl/fmtcmd/fmtcmd.go
generated
vendored
@ -58,7 +58,7 @@ func processFile(filename string, in io.Reader, out io.Writer, stdin bool, opts
|
||||
|
||||
res, err := printer.Format(src)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("In %s: %s", filename, err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(src, res) {
|
||||
|
13
vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
generated
vendored
13
vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
generated
vendored
@ -207,7 +207,7 @@ func (p *printer) literalType(lit *ast.LiteralType) []byte {
|
||||
case token.STRING:
|
||||
// If this is a multiline string, poison lines 2+ so we don't
|
||||
// indent them.
|
||||
if bytes.ContainsRune(result, '\n') {
|
||||
if bytes.IndexRune(result, '\n') >= 0 {
|
||||
result = p.heredocIndent(result)
|
||||
}
|
||||
}
|
||||
@ -503,7 +503,16 @@ func (p *printer) list(l *ast.ListType) []byte {
|
||||
val := p.output(item)
|
||||
curLen := len(val)
|
||||
buf.Write(p.indent(val))
|
||||
buf.WriteString(",")
|
||||
|
||||
// if this item is a heredoc, then we output the comma on
|
||||
// the next line. This is the only case this happens.
|
||||
comma := []byte{','}
|
||||
if lit, ok := item.(*ast.LiteralType); ok && lit.Token.Type == token.HEREDOC {
|
||||
buf.WriteByte(newline)
|
||||
comma = p.indent(comma)
|
||||
}
|
||||
|
||||
buf.Write(comma)
|
||||
|
||||
if lit, ok := item.(*ast.LiteralType); ok && lit.LineComment != nil {
|
||||
// if the next item doesn't have any comments, do not align
|
||||
|
50
vendor/vendor.json
vendored
50
vendor/vendor.json
vendored
@ -1663,70 +1663,70 @@
|
||||
"revision": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "8OPDk+bKyRGJoKcS4QNw9F7dpE8=",
|
||||
"checksumSHA1": "Ok3Csn6Voou7pQT6Dv2mkwpqFtw=",
|
||||
"path": "github.com/hashicorp/hcl",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/ast",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "5HVecyfmcTm6OTffEi6LGayQf5M=",
|
||||
"checksumSHA1": "DaQmLi48oUAwctWcX6A6DNN61UY=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/fmtcmd",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "vF6LLywGDoAaccTcAGrcY7mYvZc=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/parser",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "1k1PQRPdYEjeTbXsYz5ZP+Won1w=",
|
||||
"checksumSHA1": "K1gXmpTINkcQEh4tBjzq9UeKy/U=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/printer",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/scanner",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/strconv",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
|
||||
"path": "github.com/hashicorp/hcl/hcl/token",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=",
|
||||
"path": "github.com/hashicorp/hcl/json/parser",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=",
|
||||
"path": "github.com/hashicorp/hcl/json/scanner",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
|
||||
"path": "github.com/hashicorp/hcl/json/token",
|
||||
"revision": "b97feebd3db0a834bb92535b0950e7d5d4527a58",
|
||||
"revisionTime": "2016-11-30T20:58:18Z"
|
||||
"revision": "eb6f65b2d77ed5078887f960ff570fbddbbeb49d",
|
||||
"revisionTime": "2017-01-09T00:25:15Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "2Nrl/YKrmowkRgCDLhA6UTFgYEY=",
|
||||
|
Loading…
Reference in New Issue
Block a user