feat: add app code
- journal domain package - httpserver package - html templates - main.go in root dir
This commit is contained in:
parent
3cc4d28aac
commit
943922a6e1
20 changed files with 1032 additions and 0 deletions
18
httpserver/favicon.go
Normal file
18
httpserver/favicon.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue