mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +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
|
@ -376,7 +376,8 @@ func addHackerNewsLinksUsing(entryContent, app string) string {
|
|||
return
|
||||
}
|
||||
|
||||
if app == "opener" {
|
||||
switch app {
|
||||
case "opener":
|
||||
params := url.Values{}
|
||||
params.Add("url", hn_uri.String())
|
||||
|
||||
|
@ -389,12 +390,12 @@ func addHackerNewsLinksUsing(entryContent, app string) string {
|
|||
|
||||
open_with_opener := `<a href="` + url.String() + `">Open with Opener</a>`
|
||||
a.Parent().AppendHtml(" " + open_with_opener)
|
||||
} else if app == "hack" {
|
||||
case "hack":
|
||||
url := strings.Replace(hn_uri.String(), hn_prefix, "hack://", 1)
|
||||
|
||||
open_with_hack := `<a href="` + url + `">Open with HACK</a>`
|
||||
a.Parent().AppendHtml(" " + open_with_hack)
|
||||
} else {
|
||||
default:
|
||||
slog.Warn("Unknown app provided for openHackerNewsLinksWith rewrite rule",
|
||||
slog.String("app", app),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue