pr: more unit tests

This commit is contained in:
2024-11-11 15:52:34 +01:00
parent c757b50c65
commit dc96392b40
5 changed files with 158 additions and 14 deletions

View File

@@ -30,6 +30,8 @@ import (
"sync"
)
//go:generate mockgen -source=git_utils.go -destination=mock/git_utils.go -typed
type GitHandler struct {
DebugLogger bool
@@ -38,7 +40,13 @@ type GitHandler struct {
GitEmail string
}
func CreateGitHandler(git_author, email, name string) (*GitHandler, error) {
type GitHandlerGenerator interface {
CreateGitHandler(git_author, email, name string) (*GitHandler, error);
}
type GitHandlerImpl struct {}
func (*GitHandlerImpl) CreateGitHandler(git_author, email, name string) (*GitHandler, error) {
var err error
git := new(GitHandler)