feat: copy button
This commit is contained in:
parent
b9d7553420
commit
4b530d332c
5 changed files with 65 additions and 19 deletions
|
@ -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"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue