walk

package
v0.0.0-...-ea6fe2d Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path    string
	RelPath string
	Info    fs.FileInfo
}

func (File) String

func (f File) String() string

type Type

type Type string
const (
	Git        Type = "git"
	Auto       Type = "auto"
	Filesystem Type = "filesystem"
)

type WalkFunc

type WalkFunc func(file *File, err error) error

type Walker

type Walker interface {
	Root() string
	Walk(ctx context.Context, fn WalkFunc) error
}

func Detect

func Detect(root string, paths []string) (Walker, error)

func New

func New(walkerType Type, root string, paths []string) (Walker, error)

func NewFilesystem

func NewFilesystem(root string, paths []string) (Walker, error)

func NewGit

func NewGit(root string, paths []string) (Walker, error)

Jump to

Keyboard shortcuts

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