minor critics corrected

This commit is contained in:
2024-04-26 11:21:50 +02:00
committed by T.v.Dein
parent 3ddca1df33
commit cb737abbd4
5 changed files with 18 additions and 17 deletions

View File

@@ -49,7 +49,7 @@ func (img *Image) LogValue() slog.Value {
// holds all images of an ad
type Cache []*goimagehash.ImageHash
func NewImage(buf *bytes.Reader, filename string, uri string) *Image {
func NewImage(buf *bytes.Reader, filename, uri string) *Image {
img := &Image{
Filename: filename,
URI: uri,
@@ -134,7 +134,7 @@ func ReadImages(addir string, dont bool) (Cache, error) {
reader := bytes.NewReader(data.Bytes())
img := NewImage(reader, filename, "")
if err = img.CalcHash(); err != nil {
if err := img.CalcHash(); err != nil {
return nil, err
}