{"modulePath":"github.com/haproxytech/check-commit/v5","version":"v5.8.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package match\n\n## Functions\n\n```go\nfunc GetCargoTomlWords(content string) []string\n```\nGetCargoTomlWords extracts crate names from dependency sections of Cargo.toml content (\\[dependencies], \\[dev-dependencies], and nested variants like \\[workspace.dependencies]).\n\n```go\nfunc GetGoModWords(content string) []string\n```\nGetGoModWords extracts words from module paths in go.mod content: the module line and all require directives (block and single-line).\n\n```go\nfunc GetIdentifiersFromContent(filename, content string) []string\n```\nGetIdentifiersFromContent 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.\n\n```go\nfunc GetImportWordsFromGoFile(filename string) []string\n```\n\n```go\nfunc GetPackageJSONWords(content string) []string\n```\nGetPackageJSONWords extracts words from the package name and the keys of dependencies and devDependencies. Returns nil on malformed JSON.\n\n```go\nfunc GetPathWords(paths []string) []string\n```\nGetPathWords extracts words from repository path segments: directories, file base names, and extensions.\n\n```go\nfunc GetRequirementsWords(content string) []string\n```\nGetRequirementsWords extracts package names from requirements.txt content, skipping comments and pip option lines (-r, -e, --hash, ...).\n\n```go\nfunc MatchFilter(file, filter string) bool\n```\nMatchFilter checks if a file matches a filter.\n\nParameters:\n\n  - file: the file to be checked.\n  - filter: the filter to be matched against the file.\n\nReturns:\n\n  - bool: true if the file matches the filter, false otherwise.\n  - error: an error if there was a problem during the matching process.\n\n","path":"github.com/haproxytech/check-commit/v5/match","name":"match","synopsis":"","isRedistributable":true}
