match

package
v5.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 8 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCargoTomlWords added in v5.6.0

func GetCargoTomlWords(content string) []string

GetCargoTomlWords extracts crate names from dependency sections of Cargo.toml content ([dependencies], [dev-dependencies], and nested variants like [workspace.dependencies]).

func GetGoModWords added in v5.6.0

func GetGoModWords(content string) []string

GetGoModWords extracts words from module paths in go.mod content: the module line and all require directives (block and single-line).

func GetIdentifiersFromContent added in v5.5.1

func GetIdentifiersFromContent(filename, content string) []string

GetIdentifiersFromContent extracts function names, variable names, type names, and other identifiers from code content. It auto-detects the language based on the file extension. For Go files, it uses the go/ast parser for accurate extraction.

func GetImportWordsFromGoFile

func GetImportWordsFromGoFile(filename string) []string

func GetPackageJSONWords added in v5.6.0

func GetPackageJSONWords(content string) []string

GetPackageJSONWords extracts words from the package name and the keys of dependencies and devDependencies. Returns nil on malformed JSON.

func GetPathWords added in v5.6.0

func GetPathWords(paths []string) []string

GetPathWords extracts words from repository path segments: directories, file base names, and extensions.

func GetRequirementsWords added in v5.6.0

func GetRequirementsWords(content string) []string

GetRequirementsWords extracts package names from requirements.txt content, skipping comments and pip option lines (-r, -e, --hash, ...).

func MatchFilter

func MatchFilter(file, filter string) bool

MatchFilter checks if a file matches a filter.

Parameters:

  • file: the file to be checked.
  • filter: the filter to be matched against the file.

Returns:

  • bool: true if the file matches the filter, false otherwise.
  • error: an error if there was a problem during the matching process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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