mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-28 03:19:38 +00:00
refactor: run Go modernize (#5002)
This commit is contained in:
parent
408aa78ed5
commit
a704e86ac1
102 changed files with 322 additions and 352 deletions
|
|
@ -65,8 +65,8 @@ func (ic *IgnoreChecker) PushAllParents(ctx context.Context, targetPath string)
|
|||
|
||||
// Load patterns for each parent directory
|
||||
currentPath := "."
|
||||
parts := strings.Split(path.Clean(targetPath), "/")
|
||||
for _, part := range parts {
|
||||
parts := strings.SplitSeq(path.Clean(targetPath), "/")
|
||||
for part := range parts {
|
||||
if part == "." || part == "" {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,8 +215,8 @@ func (t Tags) Lyrics() string {
|
|||
}
|
||||
|
||||
for tag, value := range t.Tags {
|
||||
if strings.HasPrefix(tag, "lyrics-") {
|
||||
language := strings.TrimSpace(strings.TrimPrefix(tag, "lyrics-"))
|
||||
if after, ok := strings.CutPrefix(tag, "lyrics-"); ok {
|
||||
language := strings.TrimSpace(after)
|
||||
|
||||
if language == "" {
|
||||
language = "xxx"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue