Merge pull request #9860 from hashicorp/b-update-hcl

vendor: update HCL
This commit is contained in:
Mitchell Hashimoto 2016-11-03 18:54:12 -07:00 committed by GitHub
commit 24e5ea8952
2 changed files with 31 additions and 24 deletions

View File

@ -195,7 +195,8 @@ func (p *printer) output(n interface{}) []byte {
func (p *printer) literalType(lit *ast.LiteralType) []byte {
result := []byte(lit.Token.Text)
if lit.Token.Type == token.HEREDOC {
switch lit.Token.Type {
case token.HEREDOC:
// Clear the trailing newline from heredocs
if result[len(result)-1] == '\n' {
result = result[:len(result)-1]
@ -203,6 +204,12 @@ func (p *printer) literalType(lit *ast.LiteralType) []byte {
// Poison lines 2+ so that we don't indent them
result = p.heredocIndent(result)
case token.STRING:
// If this is a multiline string, poison lines 2+ so we don't
// indent them.
if bytes.ContainsRune(result, '\n') {
result = p.heredocIndent(result)
}
}
return result

46
vendor/vendor.json vendored
View File

@ -1314,68 +1314,68 @@
{
"checksumSHA1": "gjNr5WSUuPicxQzLLKpv5VsjFg0=",
"path": "github.com/hashicorp/hcl",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
"path": "github.com/hashicorp/hcl/hcl/ast",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "5HVecyfmcTm6OTffEi6LGayQf5M=",
"path": "github.com/hashicorp/hcl/hcl/fmtcmd",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "croNloscHsjX87X+4/cKOURf1EY=",
"path": "github.com/hashicorp/hcl/hcl/parser",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "JXmCiZ1N2Zv2DIYz8UmnipOgLqQ=",
"checksumSHA1": "bUeqPVCXaK3aY54XhZ2D3FrsbWo=",
"path": "github.com/hashicorp/hcl/hcl/printer",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "lgR7PSAZ0RtvAc9OCtCnNsF/x8g=",
"path": "github.com/hashicorp/hcl/hcl/scanner",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "JlZmnzqdmFFyb1+2afLyR3BOE/8=",
"path": "github.com/hashicorp/hcl/hcl/strconv",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
"path": "github.com/hashicorp/hcl/hcl/token",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=",
"path": "github.com/hashicorp/hcl/json/parser",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=",
"path": "github.com/hashicorp/hcl/json/scanner",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token",
"revision": "6e968a3fcdcbab092f5307fd0d85479d5af1e4dc",
"revisionTime": "2016-11-01T18:00:25Z"
"revision": "f74cf8281543a0797d7b4ab7d88e76e7ba125308",
"revisionTime": "2016-11-04T01:42:59Z"
},
{
"checksumSHA1": "RYz/9y1RMZfg+oMgEyJIWiSl1dU=",