17 lines
260 B
Go
17 lines
260 B
Go
package torrent
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func getFileIDs(files []*File) string {
|
|
var fileIDs []string
|
|
for _, file := range files {
|
|
if file.ID != 0 {
|
|
fileIDs = append(fileIDs, fmt.Sprintf("%d", file.ID))
|
|
}
|
|
}
|
|
return strings.Join(fileIDs, ",")
|
|
}
|