Versions in this module Expand all Collapse all v3 v3.13.1 Feb 27, 2023 Changes in this version + const VersionString + var BuildDate string + func MainColorForIcons(icons []Icon) *color.RGBA + func NewDefaultHTTPClient() *http.Client + func NewDefaultHTTPTransport(userAgent string) http.RoundTripper + type Besticon struct + func New(opts ...Option) *Besticon + func (b *Besticon) CacheEnabled() bool + func (b *Besticon) Get(urlstring string) (*http.Response, error) + func (b *Besticon) GetBodyBytes(r *http.Response) ([]byte, error) + func (b *Besticon) GetCacheStats() groupcache.CacheStats + func (b *Besticon) NewIconFinder() *IconFinder + type Icon struct + Bytes int + Error error + Format string + Height int + ImageData []byte + Sha1sum string + URL string + Width int + func (ico *Icon) Image() (*image.Image, error) + type IconFinder struct + FormatsAllowed []string + HostOnlyDomains []string + func (f *IconFinder) FetchIcons(url string) ([]Icon, error) + func (f *IconFinder) IconInSizeRange(r SizeRange) *Icon + func (f *IconFinder) Icons() []Icon + func (f *IconFinder) MainColorForIcons() *color.RGBA + type Logger interface + LogError func(err error) + LogResponse func(req *http.Request, resp *http.Response, duration time.Duration, err error) + func NewDefaultLogger(w io.Writer) Logger + type Option interface + func WithCache(sizeInMB int64) Option + func WithDefaultFormats(formats ...string) Option + func WithDiscardImageBytes(discardImageBytes bool) Option + func WithHTTPClient(client *http.Client) Option + func WithLogger(logger Logger) Option + type SizeRange struct + Max int + Min int + Perfect int + func ParseSizeRange(s string, maxIconSize int) (*SizeRange, error)