internal

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package internal contains miscellaneous functions and objects useful within Scalibr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchNamedCaptureGroups

func MatchNamedCaptureGroups(regEx *regexp.Regexp, content string) map[string]string

MatchNamedCaptureGroups takes a regular expression and string and returns all of the named capture group results in a map. This is only for the first match in the regex. Callers shouldn't be providing regexes with multiple capture groups with the same name.

func ParentDir

func ParentDir(path string, n int) string

ParentDir returns the parent dir up to n dirs deep. If the path is below n dirs, the function returns path. This function assumes no leading `/` or drive letter.

func WalkDirUnsorted

func WalkDirUnsorted(fsys fs.FS, root string, fn fs.WalkDirFunc) error

WalkDirUnsorted walks the file tree rooted at root, calling fn for each file or directory in the tree, including root.

All errors that arise visiting files and directories are filtered by fn: see the fs.WalkDirFunc documentation for details.

WalkDirUnsorted does not follow symbolic links found in directories, but if root itself is a symbolic link, its target will be walked.

Types

This section is empty.

Directories

Path Synopsis
Package units provides constants for common units.
Package units provides constants for common units.

Jump to

Keyboard shortcuts

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