mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2026-11-22 22:48:59 +01:00
satisfy linter
This commit is contained in:
@@ -19,6 +19,7 @@ package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
@@ -63,6 +64,7 @@ func ScrapeUser(conf *Config) error {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -139,6 +141,7 @@ func ScrapeAd(conf *Config, uri string) error {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -156,7 +159,7 @@ func ScrapeAd(conf *Config, uri string) error {
|
||||
if advertisement.Incomplete() {
|
||||
slog.Debug("got ad", "ad", advertisement)
|
||||
|
||||
return fmt.Errorf("could not extract ad data from page, got empty struct")
|
||||
return errors.New("could not extract ad data from page, got empty struct")
|
||||
}
|
||||
|
||||
advertisement.DecodeAttributes()
|
||||
@@ -206,7 +209,7 @@ func ScrapeImages(fetch *Fetcher, advertisement *Ad, addir string) error {
|
||||
|
||||
for _, imguri := range advertisement.Images {
|
||||
// we append the suffix later in NewImage() based on image format
|
||||
basefilename := filepath.Join(adpath, fmt.Sprintf("%d", img))
|
||||
basefilename := filepath.Join(adpath, strconv.Itoa(img))
|
||||
|
||||
egroup.Go(func() error {
|
||||
// wait a little
|
||||
@@ -259,6 +262,7 @@ func ScrapeImages(fetch *Fetcher, advertisement *Ad, addir string) error {
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
img++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user