mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Enable go-critic linter and fix various issues detected
This commit is contained in:
parent
f6404290ba
commit
b1e73fafdf
34 changed files with 126 additions and 109 deletions
|
@ -179,11 +179,12 @@ func (a *Atom10Text) Body() string {
|
|||
func (a *Atom10Text) Title() string {
|
||||
var content string
|
||||
|
||||
if strings.EqualFold(a.Type, "xhtml") {
|
||||
switch {
|
||||
case strings.EqualFold(a.Type, "xhtml"):
|
||||
content = a.xhtmlContent()
|
||||
} else if strings.Contains(a.InnerXML, "<![CDATA[") {
|
||||
case strings.Contains(a.InnerXML, "<![CDATA["):
|
||||
content = html.UnescapeString(a.CharData)
|
||||
} else {
|
||||
default:
|
||||
content = a.CharData
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue