filerutil

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorrectnessFilter

func CorrectnessFilter(file filer.File) bool

CorrectnessFilter does some corrections based on known issues (like detecting multiple licenses).

func DirFilter

func DirFilter(file filer.File) bool

DirFilter excludes directories from the file list. This is usually a good decision since most projects store their license files in the project root.

func NewFilterFiler

func NewFilterFiler(filer filer.Filer, filter filter) *filterFiler

NewFilterFiler returns a filer that wraps another filer and filters out common sources of wrong license detections.

Types

type FilterFunc

type FilterFunc func(file filer.File) bool

FilterFunc makes a filter from a function when it's signature is compatible.

func (FilterFunc) Filter

func (fn FilterFunc) Filter(file filer.File) bool

Filter calls the underlying filter function.

type Filters

type Filters []filter

Filters wraps a number of filters and executes all of them for each file.

func (Filters) Filter

func (f Filters) Filter(file filer.File) bool

Filter calls all filters for a file.

Jump to

Keyboard shortcuts

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