Help us shape the future of Go! Take the 2026 Go Developer Survey

generator

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateServiceTemplate

func GenerateServiceTemplate(dir string) error

Types

type Grep

type Grep struct {
	Root       string
	Extensions []string
	Matcher    Matcher
	Excludes   []string
}

func NewGrep

func NewGrep(root string, extensions []string, matcher Matcher, excludes []string) *Grep

func (*Grep) Exclude

func (g *Grep) Exclude(p string) bool

func (*Grep) FindFiles

func (g *Grep) FindFiles(expand HitExpansion) (*MatchSummary, error)

type HitExpansion

type HitExpansion = func(hit string) []string

type Match

type Match struct {
	Matches []string
}

type MatchSummary

type MatchSummary struct {
	FileMatches map[string]Match
	Hits        []string
}

func (*MatchSummary) Pretty

func (summary *MatchSummary) Pretty() string

type Matcher

type Matcher interface {
	Match(data []byte) [][]byte
}

func NewRegexpMatcher

func NewRegexpMatcher(pattern string) (Matcher, error)

type RegexpMatcher

type RegexpMatcher struct {
	Pattern *regexp.Regexp
}

func (RegexpMatcher) Match

func (r RegexpMatcher) Match(data []byte) [][]byte

Jump to

Keyboard shortcuts

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