Refactor folder structure
This commit is contained in:
parent
7e9a205d53
commit
c7cca02ca7
30 changed files with 610 additions and 933 deletions
20
pkg/handlers/api.go
Normal file
20
pkg/handlers/api.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/TheLovinator1/FeedVault/pkg/html"
|
||||
)
|
||||
|
||||
func ApiHandler(w http.ResponseWriter, _ *http.Request) {
|
||||
htmlData := html.HTMLData{
|
||||
Title: "FeedVault API",
|
||||
Description: "FeedVault API - A feed archive",
|
||||
Keywords: "RSS, Atom, Feed, Archive, API",
|
||||
Author: "TheLovinator",
|
||||
CanonicalURL: "http://localhost:8000/api",
|
||||
Content: "<p>Here be dragons.</p>",
|
||||
}
|
||||
html := html.FullHTML(htmlData)
|
||||
w.Write([]byte(html))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue