Skip to content

Commit

Permalink
rename generator to compose
Browse files Browse the repository at this point in the history
  • Loading branch information
pPrecel committed Mar 22, 2024
1 parent 94ec283 commit 748af12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ import (
"github.com/pterm/pterm"
)

//go:generate mockery --name=Generator --output=automock --outpkg=automock --case=underscore
type Generator interface {
//go:generate mockery --name=Compose --output=automock --outpkg=automock --case=underscore
type Compose interface {
ForConfig(*config.Config, Options) error
}

type generator struct {
type compose struct {
ctx context.Context
logger *pterm.Logger
buildClient utils.BuildClientFunc

repoCommitsLister utils.LazyCommitsLister
}

func New(ctx context.Context, logger *pterm.Logger) Generator {
return &generator{
func New(ctx context.Context, logger *pterm.Logger) Compose {
return &compose{
ctx: ctx,
logger: logger,
buildClient: github.NewClient,
Expand All @@ -46,7 +46,7 @@ type Options struct {
Ci bool
}

func (c *generator) ForConfig(config *config.Config, opts Options) error {
func (c *compose) ForConfig(config *config.Config, opts Options) error {
view := view.NewMultiTaskView(c.logger, opts.Ci)
viewLogger := c.logger.WithWriter(view.NewWriter())

Expand Down Expand Up @@ -79,7 +79,7 @@ func (c *generator) ForConfig(config *config.Config, opts Options) error {
return view.Run()
}

func (c *generator) composeForUser(remoteClients *utils.RemoteClients, user *config.User, config *config.Config, opts *Options) (*github.CommitList, error) {
func (c *compose) composeForUser(remoteClients *utils.RemoteClients, user *config.User, config *config.Config, opts *Options) (*github.CommitList, error) {
outputDir, err := sanitizeOutputDir(user.OutputDir)
if err != nil {
return nil, fmt.Errorf("failed to sanitize path '%s': %s", user.OutputDir, err.Error())
Expand Down

0 comments on commit 748af12

Please sign in to comment.