github.com/rivy-go/git-changelog@v0.0.0-20240424224517-b86e6ab57773/cmd/git-changelog/generator.go (about) 1 package main 2 3 import ( 4 "io" 5 6 changelog "github.com/rivy-go/git-changelog/internal/changelog" 7 ) 8 9 // Generator ... 10 type Generator interface { 11 Generate(io.Writer, string, *changelog.Config) error 12 } 13 14 type generatorImpl struct{} 15 16 // NewGenerator ... 17 func NewGenerator() Generator { 18 return &generatorImpl{} 19 } 20 21 // Generate ... 22 func (*generatorImpl) Generate(w io.Writer, query string, config *changelog.Config) error { 23 return changelog.NewGenerator(config).Generate(w, query) 24 }