()
| 177 | } |
| 178 | |
| 179 | func (tracks *Tracks) MarshalJSON() ([]byte, error) { |
| 180 | var trackList []common.Track |
| 181 | tracks.marshalLock.Lock() |
| 182 | defer tracks.marshalLock.Unlock() |
| 183 | tracks.Range(func(_ string, t common.Track) { |
| 184 | t.SnapForJson() |
| 185 | trackList = append(trackList, t) |
| 186 | }) |
| 187 | return json.Marshal(trackList) |
| 188 | } |
| 189 | |
| 190 | var streamIdGen atomic.Uint32 |
| 191 |
nothing calls this directly
no test coverage detected