diff --git a/internal/stage/util.go b/internal/stage/util.go index 4c9f084..a061a1e 100644 --- a/internal/stage/util.go +++ b/internal/stage/util.go @@ -1,12 +1,16 @@ package stage -import "github.com/mitchellh/mapstructure" +import ( + "fmt" + + "github.com/mitchellh/mapstructure" +) func DecodeConf[T any](confAny any) (*T, error) { var conf T err := mapstructure.Decode(confAny, &conf) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to decode conf: %w", err) } return &conf, nil }