workgroups/vendor/github.com/goreleaser/chglog/format.go
Marvin Preuss 1d4ae27878
All checks were successful
continuous-integration/drone/push Build is passing
ci: drone yaml with reusable anchors
2021-09-24 17:34:17 +02:00

18 lines
380 B
Go

package chglog
import (
"bytes"
"fmt"
"text/template"
)
// FormatChangelog format pkgLogs from a text/template.
func FormatChangelog(pkgLogs *PackageChangeLog, tpl *template.Template) (string, error) {
var data bytes.Buffer
if err := tpl.Execute(&data, pkgLogs); err != nil {
return data.String(), fmt.Errorf("error formatting: %w", err)
}
return data.String(), nil
}