From 9b956bd50504b1b3365a88bd0fef9d5313ed70e6 Mon Sep 17 00:00:00 2001 From: Akis Date: Fri, 29 Jul 2022 15:35:19 +0300 Subject: [PATCH] akis stuff --- main.go | 9 ++++++++ static/form.html | 57 +++++++++++++++++++++++++++++++++++++++++++++++ static/index.html | 5 +++++ 3 files changed, 71 insertions(+) create mode 100644 static/form.html diff --git a/main.go b/main.go index f3c241d..1b4c4d5 100644 --- a/main.go +++ b/main.go @@ -29,6 +29,15 @@ func main() { } tmpl.Execute(w, data) }) + + tmpl_form := template.Must(template.ParseFiles("static/form.html")) + http.HandleFunc("/form/", func(w http.ResponseWriter, r *http.Request) { + data := StaticThingy{ + Port: port, + } + tmpl_form.Execute(w, data) + }) + http.HandleFunc("/api/", func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "welcome to hell") }) diff --git a/static/form.html b/static/form.html new file mode 100644 index 0000000..66bcc23 --- /dev/null +++ b/static/form.html @@ -0,0 +1,57 @@ + + + + + + + Segfautilites form implementation example + + + + +
+
+ + +
+ +
+ +
+ + \ No newline at end of file diff --git a/static/index.html b/static/index.html index e03bc57..c24a09b 100644 --- a/static/index.html +++ b/static/index.html @@ -1,5 +1,9 @@ + + + + Segfautilites