fileset

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal added in v0.94.0

func Equal(a, b *fingerprint.Fingerprint) bool

func StartsWith added in v0.94.0

func StartsWith(a, b *fingerprint.Fingerprint) bool

comparators

Types

type Fileset

type Fileset[T Matchable] struct {
	// contains filtered or unexported fields
}

func New

func New[T Matchable](capacity int) *Fileset[T]

func (*Fileset[T]) Add

func (set *Fileset[T]) Add(readers ...T)

func (*Fileset[T]) Get

func (set *Fileset[T]) Get() []T

func (*Fileset[T]) Len

func (set *Fileset[T]) Len() int

func (*Fileset[T]) Match

func (set *Fileset[T]) Match(fp *fingerprint.Fingerprint, cmp func(a, b *fingerprint.Fingerprint) bool) T

func (*Fileset[T]) Pop

func (set *Fileset[T]) Pop() (T, error)

type Matchable

type Matchable interface {
	GetFingerprint() *fingerprint.Fingerprint
}

Jump to

Keyboard shortcuts

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