cmdutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cmdutil provides helpers and utilities for cmd apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TraverseFlags

type TraverseFlags struct {
	RootDir      string
	IncludeGlobs flagutil.CSVValue
	ExcludeGlobs flagutil.CSVValue
	IgnoreFile   string
}

TraverseFlags encapsulates options for file system traversal and pattern matching.

func (TraverseFlags) Ignores

func (o TraverseFlags) Ignores(f fs.FS) ([]string, error)

Ignores reads an ignore file, if specified, parsing it into a slice of exclude patterns.

func (*TraverseFlags) RegisterVars

func (o *TraverseFlags) RegisterVars(targetSet *flag.FlagSet)

RegisterVars defines command-line flags for configuring file system traversal.

func (*TraverseFlags) RootFS

func (o *TraverseFlags) RootFS() fs.FS

RootFS creates an fs.FS representing the root directory for traversal.

Jump to

Keyboard shortcuts

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