ant

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

package ant performs a function of type Processing on each file in several files, folders and sub-folders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Trees            []string                  // Trees contains all files and folders to process. Sub-folders are walked automatically.
	ExcludeTrees     []string                  // ExcludeTrees contains file and folder paths to be excluded from processing during the Walk operation.
	Verbose          bool                      // Verbose enables or disables detailed logging during processing.
	MatchingFileName func(fi os.FileInfo) bool // MatchingFileName is a user provided function and returns true on matching user conditions. Simplest case: func(_ os.FileInfo){ return true } for all files.
	Action           Processing                // Action is the user provided function executed on each file in Trees.
	Mutex            sync.RWMutex              // A sync.RWMutex is thus preferable for data that is mostly read.
	// contains filtered or unexported fields
}

Admin holds the walk specific data.

func (*Admin) Walk

func (p *Admin) Walk(w io.Writer, fSys *afero.Afero) error

Walk performs p.action on each file in passed srcs and all sub trees.

type Processing

type Processing func(w io.Writer, fSys *afero.Afero, path string, fileInfo os.FileInfo, p *Admin) error

Processing is a function type, executed for each file inside the visit function.

Jump to

Keyboard shortcuts

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