errs

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package errs provides a common set of error for the pkg n

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TmplEndTagNotFoundError added in v1.1.15

func TmplEndTagNotFoundError(err error) bool

TmplEndTagNotFoundError returns true if the given err was created by NewTmplEndTagNotFound

func TmplTagsInvalidError added in v1.1.15

func TmplTagsInvalidError(err error) bool

TmplTagsInvalidError returns true if the given err was created by NewTmplTagsInvalid

func TmplVarsNotFoundError added in v1.1.15

func TmplVarsNotFoundError(err error) bool

TmplVarsNotFoundError returns true if the given err was created by NewTmplVarsNotFound

Types

type Error

type Error struct {
	Message string
	Type    ErrorType
}

Error provides a common error type for N types

func NewTmplEndTagNotFoundError added in v1.1.15

func NewTmplEndTagNotFoundError(endTag string, starting []byte) Error

NewTmplEndTagNotFoundError indicates that a start tag was found but not an end tag or a template variable

func NewTmplTagsInvalidError added in v1.1.15

func NewTmplTagsInvalidError() Error

NewTmplTagsInvalidError indicates that the template start and/or end tags were invalid

func NewTmplVarsNotFoundError added in v1.1.15

func NewTmplVarsNotFoundError() Error

NewTmplVarsNotFoundError indicates that template variables were not found

func (Error) Error

func (e Error) Error() string

type ErrorType

type ErrorType string

ErrorType is an enumeration of well known error types

const (

	// ErrorTypeTmplEndTagNotFound indicates that a start tag was found but not an end tag or a template variable
	ErrorTypeTmplEndTagNotFound ErrorType = "TmplEndTagNotFound"

	// ErrorTypeTmplTagsInvalid indicates that the template start and/or end tags were invalid
	ErrorTypeTmplTagsInvalid ErrorType = "TmplTagsInvalid"

	// ErrorTypeTmplVarsNotFound indicates that template variables were not found
	ErrorTypeTmplVarsNotFound ErrorType = "TmplVarsNotFound"
)

Jump to

Keyboard shortcuts

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