You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used to do active development on a go 1.5.X setup on my macbook. I recently upgraded to go 1.7.1 for darwin and I am seeing runtime errors when trying to run some code that uses id3-go. The following function is fairly simple, it takes in a file extension as a string, and a path as a string, and recursively walks through the directory tree starting at the path, and returns a slice of SongFile{} representing an MP3 file.
typeSongFilestruct {
RawArtiststring`json:"raw_artist"`RawAlbumstring`json:"raw_album"`RawTitlestring`json:"raw_title"`Pathstring`json:"path"`FileNamestring`json:"filename"`AlbumArtstring`json"album_art"`
}
funccheckExt(extstring, pathstring) []SongFile {
varfiles []SongFilefilepath.Walk(path, func(pstring, f os.FileInfo, _error) error {
if!f.IsDir() {
r, err:=regexp.MatchString(ext, f.Name())
iferr==nil&&r {
mp3File, err:=id3.Open(p)
defermp3File.Close()
iferr==nil {
// Sometimes the strings come out bad with null bytes, so I do a string replaceartist:=strings.Replace(mp3File.Artist(), "\u0000", "", -1)
album:=strings.Replace(mp3File.Album(), "\u0000", "", -1)
title:=strings.Replace(mp3File.Title(), "\u0000", "", -1)
ifartist=="" {
artist="Unknown Artist"
}
ifalbum=="" {
album="Unknown Album"
}
iftitle=="" {
title="Unknown Title"
}
sf:=SongFile{Path: p, FileName: f.Name(), RawArtist: artist, RawAlbum: album, RawTitle: title}
files=append(files, sf)
} else {
fmt.Println(err.Error())
fmt.Println("! "+p+" !")
}
}
}
returnnil
})
returnfiles
}
The exact stack trace I am seeing when I call this function is as follows
After I first encountered this issue, I deleted the source code of id3-go from my $GOPATH, and re-ran go get github.com/mikkyang/id3-go but this hasn't fixed the issue. Please let me know if you need any additional information from my environment. Any information on this would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
Hello there,
I used to do active development on a go 1.5.X setup on my macbook. I recently upgraded to go 1.7.1 for darwin and I am seeing runtime errors when trying to run some code that uses
id3-go
. The following function is fairly simple, it takes in a file extension as a string, and a path as a string, and recursively walks through the directory tree starting at the path, and returns a slice of SongFile{} representing an MP3 file.The exact stack trace I am seeing when I call this function is as follows
After I first encountered this issue, I deleted the source code of id3-go from my $GOPATH, and re-ran
go get github.com/mikkyang/id3-go
but this hasn't fixed the issue. Please let me know if you need any additional information from my environment. Any information on this would be greatly appreciated. Thanks!The text was updated successfully, but these errors were encountered: