matcher

package
v0.0.0-...-8fb32ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Buying is for a post that is buying something
	Buying = "buying"
	// Selling is for a post that is selling something
	Selling = "selling"
	// Vendor is for a post from a specific vendor
	Vendor = "vendor"
	// Artisan is for a post from a specific artisan
	Artisan = "artisan"
	// GroupBuy is for a post about a group buy
	GroupBuy = "groupbuy"
	// InterestCheck is for a post about gauging interest
	InterestCheck = "interestcheck"
	// Giveaway is for a post about giving away something
	Giveaway = "giveaway"
	// Types is a list of all types
	Types = []string{Buying, Selling, Vendor, Artisan, GroupBuy, InterestCheck, Giveaway}
)

Functions

func FindMatching

func FindMatching(keywords []string, title, desc string) []string

FindMatching returns list of keywords that match a given title/description

Types

type ParsedPost

type ParsedPost struct {
	Type     string
	Contents string
	Region   string
}

ParsedPost represents a parsed Reddit post

func ParseTitle

func ParseTitle(title string) (*ParsedPost, error)

ParseTitle returns the a type, content, and error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL