parser

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: AGPL-3.0, AGPL-3.0-or-later Imports: 11 Imported by: 0

Documentation

Overview

Package parser parses and verifies user-sent post data

Index

Constants

This section is empty.

Variables

View Source
var (
	CommandRegexp = regexp.MustCompile(`^#(flip|\d*d\d+|8ball|pyu|pcount)$`)
)

Post syntax pattern matchers

Functions

func ParseBody

func ParseBody(body []byte, board string) (
	links [][2]uint64, com []common.Command, err error,
)

ParseBody parses the entire post text body for commands and links

func ParseName

func ParseName(name string) (string, string, error)

ParseName parses the name field into a name and tripcode, if any

func ParseSubject

func ParseSubject(s string) (string, error)

ParseSubject verifies and trims a thread subject string

func VerifyPostPassword

func VerifyPostPassword(s string) error

VerifyPostPassword verifies a post password exists does not surpass the maximum allowed length

Types

This section is empty.

Jump to

Keyboard shortcuts

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