iter

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: BSL-1.0 Imports: 4 Imported by: 1

README

iter

Go Reference Go Report Card

About

iter is a package for Go to run over files to process them. It is published on https://github.com/vbsw/golib/iter and https://gitlab.com/vbsw/golib/iter.

Copyright 2022, Vitali Baumtrok (vbsw@mailbox.org).

iter is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

iter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.

References

Documentation

Overview

Package iter runs over files to process them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateFilesFlat

func IterateFilesFlat(dir string, proc FileProcessor) error

IterateFilesFlat runs over files in directory dir calling proc.ProcessFile.

func IterateFilesFlatGo

func IterateFilesFlatGo(dir string, proc FileProcessor) error

IterateFilesFlatGo runs over files in directory dir calling proc.ProcessFile. Call to proc.ProcessFile happens in a separate Goroutine.

func IterateFilesRecr

func IterateFilesRecr(dir string, proc FileProcessor) error

IterateFilesRecr runs over files in directory dir calling proc.ProcessFile. Files in subdirectories are traversed, too.

func IterateFilesRecrGo

func IterateFilesRecrGo(dir string, proc FileProcessor) error

IterateFilesRecrGo runs over files in directory dir calling proc.ProcessFile. Files in subdirectories are traversed, too. Call to proc.ProcessFile happens in a separate Goroutine.

Types

type FileProcessor

type FileProcessor interface {
	ProcessFile(path string, info os.FileInfo, err error) error
}

FileProcessor is called when iterating over files to process a file.

Jump to

Keyboard shortcuts

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