This commit is contained in:
Philippe Caseiro 2022-06-29 17:02:30 +02:00
parent b25127549a
commit 0084841edc
1 changed files with 3 additions and 1 deletions

View File

@ -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++
}