parser

package
Version: v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidSectionError

func IsInvalidSectionError(err error) bool

IsInvalidSectionError returns a boolean indicating whether the error is reporting if a section of the definition is not a standard section

func IsValidDefinition

func IsValidDefinition(source string) (valid bool, err error)

IsValidDefinition returns whether or not the given file is a valid definition

func ParseDefinitionFile

func ParseDefinitionFile(r io.Reader) (d types.Definition, err error)

ParseDefinitionFile receives a reader from a definition file and parse it into a Definition struct or return error if the definition file has a bad section.

Types

type InvalidSectionError

type InvalidSectionError struct {
	Sections []string
	Err      error
}

InvalidSectionError records an error and the sections that caused it.

func (*InvalidSectionError) Error

func (e *InvalidSectionError) Error() string

Source Files

Jump to

Keyboard shortcuts

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