Skip to content

Commit df8734c

Browse files
Merge pull request #1 from multycloud/hcl_2
Use new hcl API
2 parents f06dcfd + 85945e9 commit df8734c

22 files changed

+494
-1048
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,24 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515

16-
- name: Set up Go 1.x
16+
- name: Set up Go
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: ^1.14
20-
id: go
19+
go-version: 1.17
20+
21+
- name: Setup Go 1.18rc1
22+
run: |
23+
go install golang.org/dl/go1.18rc1@latest
24+
go1.18rc1 download
2125
2226
- name: Check out code into the Go module directory
2327
uses: actions/checkout@v2
2428

2529
- name: Get dependencies
26-
run: go get -v -t -d ./...
30+
run: go1.18rc1 get -v -t -d ./...
2731

2832
- name: Build
29-
run: go build -v ./...
33+
run: go1.18rc1 build -v ./...
3034

3135
- name: Test
32-
run: go test -v -race -cover ./...
36+
run: go1.18rc1 test -v -race -cover ./...

_tests/basic.hcl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
String = "bar"
2-
1+
String = "bar"
32
EscapedString = "\"\\\n\t"
4-
5-
Int = 123
6-
7-
Bool = true
8-
9-
Float = 4.56
3+
Int = 123
4+
Bool = true
5+
Float = 4.56

_tests/empty.hcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

_tests/escaped-strings.hcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EscapedString = "\n\t\r\\\""
2+
TemplateString = "\n\t\r\\\" ${"\\ \""}"

_tests/expr-slices.hcl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
Expressions = [
2-
foo,
3-
bar,
4-
baz,
5-
]
1+
Expressions = [file("foo"), bar, baz]

_tests/label-change.hcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
foo = "bar"
2-
32
baz = 123

_tests/maps.hcl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
Foo {
2-
KeyVals = {
3-
baz = "buzz"
4-
}
2+
KeyVals = { "baz" = "buzz" }
53
}

_tests/nested-slices.hcl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
1-
{
2-
bar = [
3-
["bar"],
4-
["baz"],
5-
["buzz"],
6-
]
7-
8-
foo = [
9-
"bar",
10-
"baz",
11-
]
12-
}
1+
Value = { "bar" = [["bar"], ["baz"], ["buzz"]], "foo" = ["bar", "baz"] }
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
Widget = [
2-
{
3-
Foo = "bar"
4-
},
5-
{
6-
Foo = "baz"
7-
},
8-
]
1+
Widget = [{ "Foo" = "bar" }, { "Foo" = "baz" }]

_tests/nested-struct-slice.hcl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
Widget "bar" {}
2-
3-
Widget "baz" {}
1+
Widget "bar" {
2+
}
3+
Widget "baz" {
4+
}

0 commit comments

Comments
 (0)