mirror of
https://github.com/1f349/violet.git
synced 2024-11-09 22:22:50 +00:00
18 lines
377 B
Go
18 lines
377 B
Go
package favicons
|
|
|
|
// FaviconImage stores the url, hash and raw bytes of an image
|
|
type FaviconImage struct {
|
|
Url string
|
|
Hash string
|
|
Raw []byte
|
|
}
|
|
|
|
// CreateFaviconImage outputs a FaviconImage with the specified URL or nil if
|
|
// the URL is an empty string.
|
|
func CreateFaviconImage(url string) *FaviconImage {
|
|
if url == "" {
|
|
return nil
|
|
}
|
|
return &FaviconImage{Url: url}
|
|
}
|