 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFavicon ¶
--- GetFavicon ---
GetFavicon takes a URL string and returns a base64-encoded src URL for an <img> tag. If the favicon is already in cache and “fresh,” it returns it immediately. Otherwise it kicks off a background fetch (if one isn’t already in progress) and returns whatever is in the cache (which may be empty).
func SetInCache ¶
func SetInCache(key string, item FaviconCacheItem)
Types ¶
type FaviconCacheItem ¶
type FaviconCacheItem struct {
	// Data is the base64-encoded data URL string (e.g. "data:image/png;base64,...")
	Data string
	// LastFetched is when this entry was last updated.
	LastFetched time.Time
}
    FaviconCacheItem represents one cached favicon entry.
func GetFromCache ¶
func GetFromCache(key string) (FaviconCacheItem, bool)
 Click to show internal directories. 
   Click to hide internal directories.