Skip to content

Commit

Permalink
Add GetLogger method to GitExecutor interface
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <[email protected]>
  • Loading branch information
thombashi committed Jul 14, 2024
1 parent 5b86df8 commit c4c5be5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions git.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type GitExecutor interface {

// WithLogger sets the logger to use for logging.
WithLogger(logger *slog.Logger) GitExecutor

// GetLogger returns the logger instance.
GetLogger() *slog.Logger
}

type gitExecutorImpl struct {
Expand Down Expand Up @@ -119,3 +122,8 @@ func (e gitExecutorImpl) WithLogger(logger *slog.Logger) GitExecutor {
e.logger = logger
return e
}

// GetLogger returns the logger instance.
func (e gitExecutorImpl) GetLogger() *slog.Logger {
return e.logger
}

0 comments on commit c4c5be5

Please sign in to comment.