more tests

This commit is contained in:
2024-11-12 14:26:36 +01:00
parent dc96392b40
commit e8e51e21ca
4 changed files with 274 additions and 13 deletions

View File

@@ -41,17 +41,17 @@ type GitHandler struct {
}
type GitHandlerGenerator interface {
CreateGitHandler(git_author, email, name string) (*GitHandler, error);
CreateGitHandler(git_author, email, prj_name string) (*GitHandler, error);
}
type GitHandlerImpl struct {}
func (*GitHandlerImpl) CreateGitHandler(git_author, email, name string) (*GitHandler, error) {
func (*GitHandlerImpl) CreateGitHandler(git_author, email, prj_name string) (*GitHandler, error) {
var err error
git := new(GitHandler)
git.GitCommiter = git_author
git.GitPath, err = os.MkdirTemp("", name)
git.GitPath, err = os.MkdirTemp("", prj_name)
if err != nil {
return nil, fmt.Errorf("Cannot create temp dir: %w", err)
}