feat: gpg and ssh keys

This commit is contained in:
ange 2024-12-10 18:30:56 +00:00
parent f08dfa02ab
commit b9d7553420
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
6 changed files with 45 additions and 18 deletions

22
src/views.go Normal file
View file

@ -0,0 +1,22 @@
package main
import (
"net/http"
"path/filepath"
)
func Index(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join("html", "index.html"))
}
func Style(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "/html/style.css")
}
func Static(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, r.URL.Path)
}
func HTML(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join("html", r.URL.Path + ".html"))
}