Skip to content

Commit

Permalink
feat(input): Implement MustAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
obalunenko committed Feb 18, 2021
1 parent a601db4 commit 5b42f63
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/input/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ func Asset(name string) ([]byte, error) {
return content.ReadFile(filepath.Clean(
filepath.Join(dir, name)))
}

func MustAsset(name string) []byte {
res, err := Asset(name)
if err != nil {
panic(err)
}

return res
}

0 comments on commit 5b42f63

Please sign in to comment.