Fix go lint issues

This commit is contained in:
Kloon ImKloon 2024-03-30 14:08:52 +01:00
parent 3ff27ae915
commit e6577041f1
No known key found for this signature in database
GPG Key ID: CCF1C86A995C5B6A

View File

@ -284,8 +284,8 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
return nil return nil
} }
func calculateImageResolution(fs afero.Fs, filePath string) (*ImageResolution, error) { func calculateImageResolution(fs_ afero.Fs, filePath string) (*ImageResolution, error) {
file, err := fs.Open(filePath) file, err := fs_.Open(filePath)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -362,7 +362,7 @@ func (i *FileInfo) detectSubtitles() {
} }
} }
func (i *FileInfo) loadSubtitles(subsPath string, baseName string, recursive bool) { func (i *FileInfo) loadSubtitles(subsPath, baseName string, recursive bool) {
dir, err := afero.ReadDir(i.Fs, subsPath) dir, err := afero.ReadDir(i.Fs, subsPath)
if err == nil { if err == nil {
for _, f := range dir { for _, f := range dir {
@ -385,8 +385,8 @@ func isSubtitleMatch(f fs.FileInfo, baseName string) bool {
IsSupportedSubtitle(f.Name()) IsSupportedSubtitle(f.Name())
} }
func (i *FileInfo) addSubtitle(path string) { func (i *FileInfo) addSubtitle(path_ string) {
i.Subtitles = append(i.Subtitles, path) i.Subtitles = append(i.Subtitles, path_)
} }
func (i *FileInfo) readListing(checker rules.Checker, readHeader bool) error { func (i *FileInfo) readListing(checker rules.Checker, readHeader bool) error {