Documentation
¶
Index ¶
- func ConvertParserLinks(parserLinks []parser.Link) []checker.Link
- func CountUniqueURLs(links []checker.Link) int
- func CreateFilter(opts FilterOptions) (*filter.Filter, error)
- func Execute()
- func FilterParserLinks(parserLinks []parser.Link, urlFilter *filter.Filter) []checker.Link
- func FilterResultsAlive(results []checker.Result) []checker.Result
- func FilterResultsDead(results []checker.Result) []checker.Result
- func FilterResultsDuplicates(results []checker.Result) []checker.Result
- func FilterResultsWarnings(results []checker.Result) []checker.Result
- func SetVersion(v string)
- type FilterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertParserLinks ¶ added in v0.1.1
ConvertParserLinks converts a slice of parser.Link to checker.Link. This bridges the gap between the parser and checker packages.
func CountUniqueURLs ¶ added in v0.1.1
CountUniqueURLs returns the number of unique URLs in a slice of checker.Link. This is useful for displaying progress information and deduplication stats.
func CreateFilter ¶ added in v0.1.1
func CreateFilter(opts FilterOptions) (*filter.Filter, error)
CreateFilter builds a URL filter from config file and CLI flags. If noConfig is true, the .gonerc.yaml file will not be loaded. CLI flags are merged additively with config file settings. Returns nil if no filter rules are defined.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func FilterParserLinks ¶ added in v0.1.1
FilterParserLinks applies a URL filter to parser links and returns checker links. Links that match the filter are excluded from the result. Returns all links converted to checker.Link if urlFilter is nil.
func FilterResultsAlive ¶ added in v0.1.1
FilterResultsAlive returns only alive results. Pre-allocates slice capacity - alive is typically the majority (~70-80%).
func FilterResultsDead ¶ added in v0.1.1
FilterResultsDead returns results that are dead or errored. Pre-allocates slice capacity based on expected ratio (~5-15% dead).
func FilterResultsDuplicates ¶ added in v0.1.1
FilterResultsDuplicates returns only duplicate results. Pre-allocates slice capacity based on expected ratio (~10% duplicates).
func FilterResultsWarnings ¶ added in v0.1.1
FilterResultsWarnings returns results with warning status (redirect or blocked). Pre-allocates slice capacity based on expected ratio (~10-30% warnings).
Types ¶
type FilterOptions ¶ added in v0.1.1
type FilterOptions struct {
Domains []string // Domains to ignore (includes subdomains)
Patterns []string // Glob patterns to ignore
Regex []string // Regex patterns to ignore
NoConfig bool // Skip loading .gonerc.yaml config file
}
FilterOptions holds the configuration for creating a URL filter. This struct consolidates the filter-related flags used across commands.