mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-08 05:26:22 -07:00
Fix anti-patterns pointed out by DeepSource
But not the switch fallthroughs/expression lists, there's no benefit
This commit is contained in:
parent
497a3925e0
commit
55317504a1
17 changed files with 53 additions and 67 deletions
|
@ -38,8 +38,7 @@ func CheckAkismetAPIKey(key string) error {
|
|||
}
|
||||
|
||||
// CheckPostForSpam checks a given post for spam with Akismet. Only checks if Akismet API key is set.
|
||||
func CheckPostForSpam(userIP string, userAgent string, referrer string,
|
||||
author string, email string, postContent string) string {
|
||||
func CheckPostForSpam(userIP, userAgent, referrer, author, email, postContent string) string {
|
||||
if config.Config.AkismetAPIKey != "" {
|
||||
client := &http.Client{}
|
||||
data := url.Values{"blog": {"http://" + config.Config.SiteDomain}, "user_ip": {userIP}, "user_agent": {userAgent}, "referrer": {referrer},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue