Improve code readability #1

+ Improved tests readability of common_utils_test.go
+ Fixed minor typos
This commit is contained in:
Mikołaj Pęczkowski 2024-06-13 21:19:04 +02:00
parent 8cd3ed2127
commit 68636d5e64
8 changed files with 167 additions and 123 deletions

View file

@ -41,9 +41,9 @@ func GetRepositoryConfig(data []byte, fileExtension string) (Configuration, erro
return Configuration{}, errors.New(errorMessage)
}
if repo.Name == "" {
splittedGit := strings.Split(repo.Src, "/")
nameWithExcention := splittedGit[len(splittedGit)-1]
name := strings.Split(nameWithExcention, ".")[0]
splitGit := strings.Split(repo.Src, "/")
nameWithExtension := splitGit[len(splitGit)-1]
name := strings.Split(nameWithExtension, ".")[0]
config.Repositories[index].Name = name
}
if repo.Dest == "" {