Method receiver 'tag' is not referenced in method's body, consider removing it
50}
51
52// SegmentTag is a playlist tag example.
53func (tag *CustomSegmentTag) SegmentTag() bool {54 return true
55}
56
Method receiver 'tag' is not referenced in method's body, consider removing it
24
25// Decode decodes the input string to the internal structure. The line
26// will be the entire matched line, including the identifier.
27func (tag *CustomSegmentTag) Decode(line string) (m3u8.CustomTag, error) {28 var err error
29
30 // Since this is a Segment tag, we want to create a new tag every time it is decoded
Method receiver 'tag' is not referenced in method's body, consider removing it
18
19// TagName should return the full indentifier including the leading '#' and trailing ':'
20// if the tag also contains a value or attribute list
21func (tag *CustomSegmentTag) TagName() string {22 return "#CUSTOM-SEGMENT-TAG:"
23}
24
Method receiver 'tag' is not referenced in method's body, consider removing it
32}
33
34// SegmentTag is a playlist tag example.
35func (tag *CustomPlaylistTag) SegmentTag() bool {36 return false
37}
38
Method receiver 'tag' is not referenced in method's body, consider removing it
19// TagName should return the full indentifier including the leading
20// '#' and trailing ':' if the tag also contains a value or attribute
21// list.
22func (tag *CustomPlaylistTag) TagName() string {23 return "#CUSTOM-PLAYLIST-TAG:"
24}
25
Description
Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep the same method signature, omit the receiver name or '_' as it is unused.
Bad practice
func (f *Unix) Name() string {
return "unix"
}
func (_ *Unix) Name() string {
return "unix"
}
Recommended
func (*Unix) Name() string {
return "unix"
}