1089
1090// Range over segments of media playlist. Check for ring buffer corner
1091// cases.
1092func ExampleMediaPlaylistGetAllSegments() {1093 m, _ := NewMediaPlaylist(3, 3)
1094 _ = m.Append("t00.ts", 10, "")
1095 _ = m.Append("t01.ts", 10, "")
990// Create new media playlist
991// Add two segments to media playlist
992// Print it
993func ExampleMediaPlaylist_String_Winsize0_VOD() { 994 p, _ := NewMediaPlaylist(0, 2)
995 p.Append("test01.ts", 5.0, "")
996 p.Append("test02.ts", 6.0, "")
971// Create new media playlist
972// Add two segments to media playlist
973// Print it
974func ExampleMediaPlaylist_String_Winsize0() { 975 p, _ := NewMediaPlaylist(0, 2)
976 p.Append("test01.ts", 5.0, "")
977 p.Append("test02.ts", 6.0, "")
Malformed names, wrong signatures, and examples documenting non-existent identifiers may not be what was intended by the programmer and hence are an issue.
For example, the Examplereverse
function does not map to any function and
won't be picked up by godoc. It was probably intended as ExampleReverse
.
func Reverse() string {
return "reverse"
}
// example
func Examplereverse() {
x := Reverse()
// Output: reverse
}