feat: copy button

This commit is contained in:
ange 2024-12-12 14:28:45 +00:00
parent b9d7553420
commit 4b530d332c
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
5 changed files with 65 additions and 19 deletions

View file

@ -5,18 +5,18 @@ import (
"path/filepath"
)
func Index(w http.ResponseWriter, r *http.Request) {
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) {
func style(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "/html/style.css")
}
func Static(w http.ResponseWriter, r *http.Request) {
func static(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, r.URL.Path)
}
func HTML(w http.ResponseWriter, r *http.Request) {
func html(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join("html", r.URL.Path + ".html"))
}