Open kaihendry opened 7 years ago
Ok, discovered I can check for against nil, but why make it so odd to use?
It's probably more of a legacy issue than anything else, we do auto extend now, but just by doubling of size.
To get the count of elements use https://godoc.org/github.com/grafov/m3u8#MediaPlaylist.Count
To loop them I normally check for nil and then break.
https://play.golang.org/p/hmbq78PZbO
Why is the slice not the same size as the parsed segments of the playlist? How can I tell when I am about to go over the last segment and cause a panic?
Many thanks!