edm

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package edm implement the main edm struct, which offers the following:

SelectFiles: Walks through all the subdirectories of the path specified, collating a list of relevant files. ExamineFiles: Reads and sample the lines from the output of `SelectFiles` SampleContent: (Optional) Filters the result of `ExamineFiles`

The above consumes filters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(lines []string, filters ...content.Filter) []string

Types

type Edm

type Edm struct {
	Content []string
	Paths   []string
	// contains filtered or unexported fields
}

func New

func New(opts Opts) (Edm, error)

func (*Edm) ExamineFiles

func (e *Edm) ExamineFiles(filters ...content.Filter) (err error)

func (*Edm) SampleContent

func (e *Edm) SampleContent(filters ...content.Filter) []string

func (*Edm) SelectFiles

func (e *Edm) SelectFiles(dir string, filters ...file.Filter) (err error)

type Filter

type Filter struct {
	MinLineLength     int
	RequireExtensions []string
	IgnoreFolder      []string
}

type Opts

type Opts struct{}

Jump to

Keyboard shortcuts

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