modulepackage
0.0.0-20240727101843-c61065f83192
Repository: https://github.com/yulog/go-favicon.git
Documentation: pkg.go.dev
# README
go-favicon
fork of deanishe/go-favicon
Discover favicons for a website. Parses HTML and manifest files.
Import path is github.com/yulog/go-favicon
.
# Packages
No description provided by the author
# Functions
Find finds favicons for URL.
FindGoQueryDocument finds a favicon in GoQueryDocument.
FindNode finds a favicon in HTML Node.
FindReader finds a favicon in HTML.
MaxHeight ignores icons larger than the given height.
MaxWidth ignores icons larger than the given width.
MinHeight ignores icons smaller than the given height.
MinWidth ignores icons smaller than the given width.
New creates a new Finder configured with the given options.
OnlyMimeType only finds Icons that have one of the specified MIME types, e.g.
WithClient configures Finder to use the given HTTP client.
WithFilter only returns Icons accepted by Filter functions.
WithLogger sets the logger used by Finder.
WithSorter configures Finder to use the given Sorter.
# Variables
IconNames are common names of icon files hosted in server roots.
IgnoreManifest ignores manifest.json files.
IgnoreNoSize ignores icons with no specified size.
IgnoreWellKnown ignores common locations like /favicon.ico.
NopSort represents a no operation sorting.
OnlyICO ignores non-ICO files.
OnlyPNG ignores non-PNG files.
OnlySquare ignores non-square files.
SortByWidth sorts icons by width (largest first), and then by image type (PNG > JPEG > SVG > ICO).
UserAgent is sent in the User-Agent HTTP header.
# Structs
Finder discovers favicons for a URL.
Icon is a favicon parsed from an HTML file or JSON manifest.
Manifest is the relevant parts of a manifest.json file.
ManifestIcon is an icon from a manifest.json file.
# Interfaces
Logger describes the logger used by Finder.