From 0084841edc905eb732d1e626b4707268e38b2845 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Wed, 29 Jun 2022 17:02:30 +0200 Subject: [PATCH] Try 07 --- pkg/templater/repo-apk.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/templater/repo-apk.go b/pkg/templater/repo-apk.go index 8b3b1d8..70f0b4d 100644 --- a/pkg/templater/repo-apk.go +++ b/pkg/templater/repo-apk.go @@ -4,10 +4,12 @@ import ( "bufio" "fmt" "io/ioutil" + "log" "os" "strings" "forge.cadoles.com/pcaseiro/templatefile/pkg/utils" + "google.golang.org/appengine/log" ) var APKConfigFile = "/etc/apk/repositories" @@ -29,9 +31,9 @@ func (hr *APKRepository) urlIsPresent() (bool, error) { line := 1 for scanner.Scan() { if strings.Contains(scanner.Text(), hr.URL) { + log.Printf("Repository %s already present\n", hr.Name) return true, nil } - line++ }