diff --git a/cmd/gogitlabber/git.go b/cmd/gogitlabber/git.go index 32f4eb5..d163795 100644 --- a/cmd/gogitlabber/git.go +++ b/cmd/gogitlabber/git.go @@ -76,7 +76,7 @@ func pullRepository(repoName string, repoDestination string) { remoteCmd := exec.Command("git", "-C", repoDestination, "remote", "show") remoteOutput, err := remoteCmd.CombinedOutput() if err != nil { - return "", fmt.Errorf("finding remote: %v", err) + return "", fmt.Errorf("finding remote: %v\n", err) } remote := strings.Split(strings.TrimSpace(string(remoteOutput)), "\n")[0] diff --git a/cmd/gogitlabber/gitlab.go b/cmd/gogitlabber/gitlab.go index 8a94643..821124a 100644 --- a/cmd/gogitlabber/gitlab.go +++ b/cmd/gogitlabber/gitlab.go @@ -29,7 +29,7 @@ func fetchRepositoriesGitlab() ([]Repository, error) { req, err := http.NewRequest("GET", url, nil) if err != nil { - return nil, fmt.Errorf("creating request: %v", err) + return nil, fmt.Errorf("creating request: %v\n", err) } req.Header.Set("PRIVATE-TOKEN", gitlabToken) @@ -37,21 +37,21 @@ func fetchRepositoriesGitlab() ([]Repository, error) { client := &http.Client{} resp, err := client.Do(req) if err != nil { - return nil, fmt.Errorf("making request: %v", err) + return nil, fmt.Errorf("making request: %v\n", err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("API request failed with status: %d", resp.StatusCode) + return nil, fmt.Errorf("API request failed with status: %d\n", resp.StatusCode) } var repositories []Repository if err := json.NewDecoder(resp.Body).Decode(&repositories); err != nil { - return nil, fmt.Errorf("decoding response: %v", err) + return nil, fmt.Errorf("decoding response: %v\n", err) } if len(repositories) < 1 { - return repositories, fmt.Errorf("no repositories found") + return repositories, fmt.Errorf("no repositories found\n") } return repositories, nil diff --git a/cmd/gogitlabber/input.go b/cmd/gogitlabber/input.go index 3abf3cd..8e36599 100644 --- a/cmd/gogitlabber/input.go +++ b/cmd/gogitlabber/input.go @@ -29,7 +29,7 @@ func manageArguments() { gitlabToken = envToken default: flag.Usage() - log.Printf("fatal: config; gitlab api token not found") + log.Printf("fatal: config; gitlab api token not found\n") } // manage gitlab url option @@ -38,7 +38,7 @@ func manageArguments() { gitlabHost = envHost default: flag.Usage() - log.Fatalf("fatal: config; gitlab host not found") + log.Fatalf("fatal: config; gitlab host not found\n") } // manage destination option @@ -47,7 +47,7 @@ func manageArguments() { repoDestinationPre = envRepoDest default: flag.Usage() - log.Fatalf("fatal: config; destination not found") + log.Fatalf("fatal: config; destination not found\n") } // add slash 🎩🎸 if not provided @@ -72,6 +72,6 @@ func manageArguments() { default: flag.Usage() - log.Fatalf("fatal: config; no or wrong archive option found") + log.Fatalf("fatal: config; no or wrong archive option found\n") } } diff --git a/cmd/gogitlabber/output.go b/cmd/gogitlabber/output.go index f199393..380a283 100644 --- a/cmd/gogitlabber/output.go +++ b/cmd/gogitlabber/output.go @@ -41,7 +41,7 @@ func progressBar(repositories []Repository) { func progressBarAdd(amount int) { if err := bar.Add(amount); err != nil { - log.Printf("Progress bar update error: %v", err) + log.Printf("Progress bar update error: %v\n", err) } }