favicon

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package favicon provides a favicon downloader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, u *url.URL, opts Options) ([]byte, string, error)

Download tries to download the favicon with highest resolution for the specified host By default it looks into the standard locations

Types

type Options

type Options struct {
	// Client is http.Client used to download the favicon. Leave nil to use the
	// http.Default with a timeout of 10 seconds
	Client *http.Client
	// MinSize is the min size of the favicon to be considered valid.
	// favicon smaller than minSize will be ignored unless ForceMinSize is true
	MinSize int
}

Jump to

Keyboard shortcuts

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