mtreefilter

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterDeltas

func FilterDeltas(deltas []mtree.InodeDelta, filter FilterFunc) []mtree.InodeDelta

FilterDeltas is a helper function to easily filter []mtree.InodeDelta with a filter function. Only entries which have `filter(delta.Path()) == true` will be included in the returned slice.

Types

type FilterFunc

type FilterFunc func(path string) bool

FilterFunc is a function used when filtering deltas with FilterDeltas.

func MaskFilter

func MaskFilter(masks []string) FilterFunc

MaskFilter is a factory for FilterFuncs that will mask all InodeDelta paths that are lexical children of any path in the mask slice. All paths are considered to be relative to '/'.

Jump to

Keyboard shortcuts

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