package ga // import "yapperbot-frs/src/ga"
CONSTANTS
const gaPrefix string = "<!--gan-->"
gaPrefix is just used for lopping off the starting comment from a GA nom; we
don't do any extra processing with it at the moment.
const requestType string = "Good Article nomination"
VARIABLES
var gaSubtopicRegex *regexp.Regexp
gaSubtopicRegex matches each GA subtopic from within a topic on the on-wiki
list of GA topics.
var gaTopics map[string]string
gaTopics is a map storing the Good Article topics in the form {"subtopic":
"topic"}
var gaTopicsRegex *regexp.Regexp
gaTopicsRegex matches each GA topic from the on-wiki list of GA topics.
FUNCTIONS
func FetchGATopics()
FetchGATopics fetches the latest GA topics from the Good Article noms page.
func init()
TYPES
type Nom struct {
Topic string
Article string
Subtopic string
}
Nom represents a GA nomination, which has a single category only.
func (n Nom) IncludeHeader(header string) (bool, bool)
IncludeHeader determines if a given FRS header corresponds to this item
correctly Takes a string of the entire header (minus the === bits) and
returns a bool for if the header is included, and separately a bool
indicating whether the header is the all header or not. At present, the
second bool is always false, as there is no all header for GA.
func (n Nom) PageTitle() string
PageTitle is a simple getter for the GA nominee article in order to make the
interface work
func (n Nom) RequestType() string
RequestType returns the type this is - a GA nom - so that it can be used in
a template