This commit is contained in:
Philippe Caseiro 2022-06-29 16:32:34 +02:00
parent e7432d7fed
commit 6b22dd99c8
1 changed files with 0 additions and 4 deletions

View File

@ -28,14 +28,12 @@ func (hr *APKRepository) urlIsPresent() (bool, error) {
line := 1 line := 1
for scanner.Scan() { for scanner.Scan() {
fmt.Printf("DBG:%s:%s:\n", scanner.Text(), hr.URL)
if strings.Contains(scanner.Text(), hr.URL) { if strings.Contains(scanner.Text(), hr.URL) {
return true, nil return true, nil
} }
line++ line++
} }
fmt.Printf("END\n")
if err := scanner.Err(); err != nil { if err := scanner.Err(); err != nil {
return false, err return false, err
@ -52,11 +50,9 @@ func (hr *APKRepository) Add() error {
} }
if URLIsPresent { if URLIsPresent {
fmt.Printf("DEBUG %v\n", URLIsPresent)
return nil return nil
} else { } else {
data := fmt.Sprintf("%s\n", hr.URL) data := fmt.Sprintf("%s\n", hr.URL)
fmt.Printf("DEBUG %v", data)
file, err := os.OpenFile(APKConfigFile, os.O_APPEND|os.O_WRONLY, 0644) file, err := os.OpenFile(APKConfigFile, os.O_APPEND|os.O_WRONLY, 0644)
if err != nil { if err != nil {
return err return err