glob

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach(dir string, cb func(*File) bool, opts ...Option)

func ForEachContext

func ForEachContext(ctx context.Context, dir string, cb func(*File) bool, opts ...Option)

func Walk

func Walk(dir string, opts ...Option) <-chan *File

func WalkContext

func WalkContext(ctx context.Context, dir string, opts ...Option) <-chan *File

Types

type Checksum

type Checksum [hashSize]byte

func (Checksum) Slice

func (d Checksum) Slice() []byte

func (Checksum) String

func (d Checksum) String() string

type File

type File = gocodewalker.File

func Collect

func Collect(dir string, opts ...Option) []*File

func CollectContext

func CollectContext(ctx context.Context, dir string, opts ...Option) []*File

type HashList

type HashList struct {
	HashMap    map[string]Checksum
	StableList []string
	// contains filtered or unexported fields
}

func Hash

func Hash(dir string, opts ...Option) *HashList

func HashContext

func HashContext(ctx context.Context, dir string, opts ...Option) *HashList

func ReduceToHash

func ReduceToHash(ch <-chan *File) (l *HashList)

func (*HashList) All added in v0.2.7

func (l *HashList) All() Checksum

func (*HashList) Dir

func (l *HashList) Dir(prefix string) Checksum

func (*HashList) File

func (l *HashList) File(location string) (Checksum, bool)

type Option

type Option = func(*Walker)

func AddGitIgnores added in v0.2.2

func AddGitIgnores(dir string) Option

func AllowListExtensions

func AllowListExtensions(extensions ...string) Option

func ExcludeDirectory

func ExcludeDirectory(patterns ...string) Option

func ExcludeDirectoryRegex

func ExcludeDirectoryRegex(patterns ...string) Option

func ExcludeFilename

func ExcludeFilename(patterns ...string) Option

func ExcludeFilenameRegex

func ExcludeFilenameRegex(patterns ...string) Option

func ExcludeListExtensions

func ExcludeListExtensions(extensions ...string) Option

func IgnoreArtifacts

func IgnoreArtifacts() Option

func IgnoreGitIgnore

func IgnoreGitIgnore() Option

func IgnoreIgnoreFile

func IgnoreIgnoreFile() Option

func IncludeDirectory

func IncludeDirectory(patterns ...string) Option

func IncludeDirectoryRegex

func IncludeDirectoryRegex(patterns ...string) Option

func IncludeFilename

func IncludeFilename(patterns ...string) Option

func IncludeFilenameRegex

func IncludeFilenameRegex(patterns ...string) Option

func IncludeHidden

func IncludeHidden() Option

func LocationExcludePattern

func LocationExcludePattern(patterns ...string) Option

type Walker

type Walker = gocodewalker.FileWalker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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