parse

package
v0.0.0-...-27f5e65 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package parse has functions to parse the irc protocol into irc.IrcMessages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(str []byte) (*irc.Event, error)

Parse produces an IrcMessage from a byte slice. The string is an irc protocol message, split by \r\n, and \r\n should not be present at the end of the string.

Types

type ParseError

type ParseError struct {
	// The invalid irc encountered.
	Irc string
}

ParseError is generated when something does not match the regex, irc.Parse will return one of these containing the invalid seeming irc protocol string.

func (ParseError) Error

func (p ParseError) Error() string

Error satisfies the Error interface for ParseError.

Jump to

Keyboard shortcuts

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