18 lines
205 B
Go
18 lines
205 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"github.com/hashicorp/hcl/v2"
|
||
|
)
|
||
|
|
||
|
func CheckErr(e error) {
|
||
|
if e != nil {
|
||
|
panic(e)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func CheckDiags(diag hcl.Diagnostics) {
|
||
|
if diag.HasErrors() {
|
||
|
panic(diag.Error())
|
||
|
}
|
||
|
}
|