Try 07
This commit is contained in:
parent
b25127549a
commit
0084841edc
|
@ -4,10 +4,12 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"forge.cadoles.com/pcaseiro/templatefile/pkg/utils"
|
"forge.cadoles.com/pcaseiro/templatefile/pkg/utils"
|
||||||
|
"google.golang.org/appengine/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
var APKConfigFile = "/etc/apk/repositories"
|
var APKConfigFile = "/etc/apk/repositories"
|
||||||
|
@ -29,9 +31,9 @@ func (hr *APKRepository) urlIsPresent() (bool, error) {
|
||||||
line := 1
|
line := 1
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
if strings.Contains(scanner.Text(), hr.URL) {
|
if strings.Contains(scanner.Text(), hr.URL) {
|
||||||
|
log.Printf("Repository %s already present\n", hr.Name)
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
line++
|
line++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue