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