Skip to content

Commit 41c8c73

Browse files
authored
Merge pull request #58 from Trundle/simplify-example
Simplify example in README: use UnmarshalFile
2 parents bcdfb60 + b8e0dbe commit 41c8c73

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package main
1616

1717
import (
1818
"fmt"
19-
"io/ioutil"
2019

2120
"github.com/philandstuff/dhall-golang/v6"
2221
)
@@ -30,11 +29,7 @@ type Config struct {
3029

3130
func main() {
3231
var config Config
33-
bytes, err := ioutil.ReadFile("/path/to/config.dhall")
34-
if err != nil {
35-
panic(err)
36-
}
37-
err = dhall.Unmarshal(bytes, &config)
32+
err = dhall.UnmarshalFile("/path/to/config.dhall", &config)
3833
if err != nil {
3934
panic(err)
4035
}

0 commit comments

Comments
 (0)