{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package faviconcache\n\n## Functions\n\n```go\nfunc GetFavicon(urlStr string) string\n```\n\\--- GetFavicon ---\n\nGetFavicon takes a URL string and returns a base64-encoded src URL for an \\\u003cimg\u003e 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).\n\n```go\nfunc SetInCache(key string, item FaviconCacheItem)\n```\n\n## Types\n\n```go\ntype FaviconCacheItem struct {\n\t// Data is the base64-encoded data URL string (e.g. \"data:image/png;base64,...\")\n\tData string\n\t// LastFetched is when this entry was last updated.\n\tLastFetched time.Time\n}\n```\nFaviconCacheItem represents one cached favicon entry.\n\n```go\nfunc GetFromCache(key string) (FaviconCacheItem, bool)\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/faviconcache","name":"faviconcache","synopsis":"","isRedistributable":true}
