Skip to content

Commit

Permalink
Use Box.Find instead of Box.MustBytes
Browse files Browse the repository at this point in the history
MustBytes has been marked as deprecated and will be removed in
version 2. Find works in both v2 and latest v1 release.
  • Loading branch information
rikonen committed Nov 20, 2018
1 parent 5f4c2bf commit 21df5f0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
38 changes: 35 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[[constraint]]
name = "github.com/gobuffalo/packr"
version = "1.13.7"
version = "1.21.2"

[[constraint]]
name = "github.com/hashicorp/terraform"
Expand Down
2 changes: 1 addition & 1 deletion user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func readUserConfigJSONSchema(name string) map[string]interface{} {
box := packr.NewBox("./templates")
data, err := box.MustBytes(name)
data, err := box.Find(name)
if err != nil {
panic(fmt.Sprintf("Failed to read %v: %v", name, err))
}
Expand Down

0 comments on commit 21df5f0

Please sign in to comment.