matcher

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Implementation to find the string that will be the overview from the code or Markdown.

Index

Constants

View Source
const (
	Markdown        = "markdown"
	MarkdownHeading = "markdownHeading"
	Godoc           = "godoc"
)

Variables

View Source
var MatcherMap = map[string]func() (Matcher, error){
	"markdown":        NewMarkdownMatcher,
	"markdownHeading": NewMarkdownHeadingMatcher,
	"godoc":           NewGodocMatcher,
}

Functions

This section is empty.

Types

type GodocMatcher

type GodocMatcher struct{}

func (*GodocMatcher) Match

func (m *GodocMatcher) Match(codes, comments []string) (string, error)

type MarkdownMatcher

type MarkdownMatcher struct{}

func (*MarkdownMatcher) Match

func (m *MarkdownMatcher) Match(codes, comments []string) (string, error)

type Matcher

type Matcher interface {
	Match(codes, comments []string) (string, error)
}

func NewGodocMatcher

func NewGodocMatcher() (Matcher, error)

func NewMarkdownHeadingMatcher

func NewMarkdownHeadingMatcher() (Matcher, error)

func NewMarkdownMatcher

func NewMarkdownMatcher() (Matcher, error)

func NewRegexpMatcher

func NewRegexpMatcher(expr string) (Matcher, error)

type RegexpMatcher

type RegexpMatcher struct {
	// contains filtered or unexported fields
}

func (*RegexpMatcher) Match

func (m *RegexpMatcher) Match(codes, comments []string) (string, error)

Jump to

Keyboard shortcuts

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