package httpserver

import "net/http"

type Favicon struct {
	favicon []byte
}

func NewFavicon(favicon []byte) *Favicon {
	return &Favicon{
		favicon: favicon,
	}
}

func (f *Favicon) FaviconHandler(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", "image/x-icon")
	w.Write(f.favicon)
}
