Skip to content

Commit 610edb6

Browse files
committed
Review fix
1 parent 9eaf349 commit 610edb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

reader.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func decodeLineOfMasterPlaylist(p *MasterPlaylist, state *decodingState, line st
332332
case "CHANNELS":
333333
channels, err := strconv.Atoi(v)
334334
if err != nil {
335-
return fmt.Errorf("non-integer value \"%s\" for CHANNELS attribute", v)
335+
return fmt.Errorf("non-integer value %q for CHANNELS attribute", v)
336336
}
337337
alt.Channels = uint(channels)
338338
}

writer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ func (p *MasterPlaylist) Encode() *bytes.Buffer {
155155
p.buf.WriteString(alt.URI)
156156
p.buf.WriteRune('"')
157157
}
158-
p.buf.WriteRune('\n')
159158
if alt.Channels != 0 {
160159
p.buf.WriteString(",CHANNELS=\"")
161160
p.buf.WriteString(strconv.FormatUint(uint64(alt.Channels), 10))
162161
p.buf.WriteRune('"')
163162
}
163+
p.buf.WriteRune('\n')
164164
}
165165
}
166166
if pl.Iframe {

0 commit comments

Comments
 (0)