parser

package
v0.0.0-...-f90c734 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, rcvr Parser) error

Register a parser under a unique name.

Types

type Document

type Document interface {
	Filter(attr string) (Document, error)
	Slice() []Document
	String() string
}

Document is an interface that represents a generic, introspect-able document.

func Parse

func Parse(kind string, src io.Reader) (Document, error)

Parse calls the appropriate concrete parser for the kind passed. Returns a parsed document, which can then be queried against, or an error if parsing fails.

type Parser

type Parser interface {
	Parse(io.Reader) (Document, error)
}

Parser is an interface that wraps the Parse method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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