style: prefer stdlib idioms for errors and http methods

This commit is contained in:
Mathis Maquenne
2026-08-05 21:43:59 +02:00
parent a695fb4de3
commit c1775e5c04
12 changed files with 50 additions and 44 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package tag
import (
"fmt"
"strconv"
"strings"
@@ -37,7 +36,7 @@ func (t *id3v2Tagger) write(m Metadata) error {
t.addTag("TEXT", m.Lyricists)
t.addTag("TCON", m.Genre)
if duration, err := strconv.Atoi(m.Duration); err == nil {
t.addTag("TLEN", fmt.Sprintf("%d", duration*1000))
t.addTag("TLEN", strconv.Itoa(duration*1000))
}
t.addTag("TBPM", m.BPM)
t.addTag("TKEY", m.Key)