Fix go vet errors
This commit is contained in:
parent
b0129e5239
commit
e84b1d67cb
8 changed files with 16 additions and 12 deletions
|
|
@ -65,7 +65,7 @@ func resizePicture(importedPath string, rect image.Rectangle) error {
|
|||
}
|
||||
defer dstFile.Close()
|
||||
|
||||
if err = jpeg.Encode(dstFile, dst, &jpeg.Options{100}); err != nil {
|
||||
if err = jpeg.Encode(dstFile, dst, &jpeg.Options{Quality: 100}); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
|
|
@ -75,7 +75,7 @@ func resizePicture(importedPath string, rect image.Rectangle) error {
|
|||
}
|
||||
defer dstFile.Close()
|
||||
|
||||
if err = jpeg.Encode(dstFile, src, &jpeg.Options{100}); err != nil {
|
||||
if err = jpeg.Encode(dstFile, src, &jpeg.Options{Quality: 100}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
@ -190,7 +190,7 @@ func BuildTheme(i Importer, tdir string) (th *fic.Theme, errs []error) {
|
|||
// SyncThemes imports new or updates existing themes.
|
||||
func SyncThemes(i Importer) (errs []error) {
|
||||
if themes, err := GetThemes(i); err != nil {
|
||||
errs = append(errs, fmt.Errorf("Unable to list themes: %w", err.Error()))
|
||||
errs = append(errs, fmt.Errorf("Unable to list themes: %w", err))
|
||||
} else {
|
||||
rand.Shuffle(len(themes), func(i, j int) {
|
||||
themes[i], themes[j] = themes[j], themes[i]
|
||||
|
|
|
|||
Reference in a new issue