discoverfiles

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverFilePaths

func DiscoverFilePaths(filePaths []string, recursive bool) ([]string, error)

DiscoverFilePaths returns all file paths that come from file paths provided as the argument. Return directly if they are standard files. For directories list all files available in its root or recursively traverse all subdirectories and find files in them when the argument recursive is true. For "-" path that indicates standard input or starts with http:// or https://, it returns the path directly in the same way as other paths.

func RegisterFileRelatedFlags

func RegisterFileRelatedFlags(cmd *cobra.Command, filePaths *[]string, recursive *bool)

RegisterFileRelatedFlags registers flags --file | -f and --recursive | -R for command passed as the argument and make them required.

Types

This section is empty.

Jump to

Keyboard shortcuts

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