File: comment_submit.go

package info (click to toggle)
golang-github-adtac-go-akismet 0.0~git20181220.0ca9e10-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 104 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 887 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package akismet

// This function submits a false positive to Akismet using the API. False
// positives are those comments that should *not* be marked as spam, but were
// accidentally. This method is mandatorily required in all implementations.
// If the request went fine, a nil error is returned. Otherwise the returned
// error is non-nil.
func SubmitHam(c *Comment, key string) error {
	_, err := postRequest(c, key, "submit-ham")
	return err
}

// This function submits a false negatives to Akismet using the API. False
// negatives are those comments that should be marked as spam, but were *not*
// accidentally. This method is mandatorily required in all implementations.
// If the request went fine, a nil error is returned. Otherwise the returned
// error is non-nil.
func SubmitSpam(c *Comment, key string) error {
	_, err := postRequest(c, key, "submit-spam")
	return err
}