utils

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeSupportedDomains

func MergeSupportedDomains[T any](extractor T) map[string]T

MergeSupportedDomains creates a map from domains to extractors, handling multi-domain support This is a generic function that works with any type that has domain information JavaScript equivalent: export default function mergeSupportedDomains(extractor)

Types

type MockExtractor

type MockExtractor struct {
	Domain           string   `json:"domain"`
	SupportedDomains []string `json:"supportedDomains,omitempty"`
	Name             string   `json:"name"`
}

MockExtractor represents a test extractor for domain mapping tests In real usage, this would be replaced by actual extractor types

Directories

Path Synopsis
ABOUTME: Cleans H1 tags from article content based on count threshold analysis.
ABOUTME: Cleans H1 tags from article content based on count threshold analysis.
ABOUTME: Implements article base URL extraction by removing pagination parameters ABOUTME: Faithful port of JavaScript article-base-url.js with identical logic and behavior
ABOUTME: Implements article base URL extraction by removing pagination parameters ABOUTME: Faithful port of JavaScript article-base-url.js with identical logic and behavior

Jump to

Keyboard shortcuts

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