Documentation ¶
Index ¶
- Constants
- Variables
- func Extensions() []string
- func FindHrefPatterns(resp *http.Response) ([]string, error)
- func RLEHeaderRegexp() *regexp.Regexp
- type MultiplePatternsError
- type Pattern
- func Default() *Pattern
- func New(conf *config.Config) (*Pattern, error)
- func Unmarshal(r io.Reader) (*Pattern, error)
- func UnmarshalFile(path string) (*Pattern, error)
- func UnmarshalPlaintext(r io.Reader) (*Pattern, error)
- func UnmarshalRLE(r io.Reader) (*Pattern, error)
- func UnmarshalURL(ctx context.Context, url string) (*Pattern, error)
Constants ¶
View Source
const ( ExtRLE = ".rle" ExtPlaintext = ".cells" )
Variables ¶
View Source
var ( ErrInvalidHeader = errors.New("invalid header") ErrUnexpectedCharacter = errors.New("unexpected character") ErrDetectFailed = errors.New("unable to detect pattern file format") )
View Source
var ErrNoPatternLinks = errors.New("no pattern links found")
View Source
var ErrResponse = errors.New("HTTP error")
Functions ¶
func Extensions ¶
func Extensions() []string
func RLEHeaderRegexp ¶
Types ¶
type MultiplePatternsError ¶
type MultiplePatternsError struct {
URLs []string
}
func (MultiplePatternsError) Error ¶
func (m MultiplePatternsError) Error() string
Click to show internal directories.
Click to hide internal directories.