Merge string trimming for id3v1 into single method
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
package tag
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"io"
|
||||
)
|
||||
@@ -50,14 +49,6 @@ func readString(r io.Reader, n int) (string, error) {
|
||||
return string(b), nil
|
||||
}
|
||||
|
||||
func readStringTrimNULL(r io.Reader, n int) (string, error) {
|
||||
b, err := readBytes(r, n)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(bytes.Trim(b, "\x00")), nil
|
||||
}
|
||||
|
||||
func readInt(r io.Reader, n int) (int, error) {
|
||||
b, err := readBytes(r, n)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user