Beispiel #1
0
// the appropriate place for this function is in a unit test
// the appropriate place for this style of exploratory code is in unit tests.
// TODO: figure out TDD in Go
func whataboutnullchars(file *id3.File, path string) {
	taggerVersion := file.Tagger.Version()
	trimmed_artist := stripTerminalNull(file.Artist())
	fmt.Println(file.Artist(), "| to |", trimmed_artist, "|file ", path, " version ", taggerVersion)
	// here I just found out that the id3v1 parser doesn't strip the null padding bytes at the end of id3v1 fields.
	// also maybe I have some songs with 16bit-wide metadata fields?
	// look
	// er
	// turns out a nul byte, even in a comment, is illegal.
	// see file notes for originally included offending line.
	// strings are complicated
}