Alan Shreve 12 years ago
parent
commit
cf47e0578e
2 changed files with 9 additions and 9 deletions
  1. 6 6
      src/ngrok/client/ui/static/debug.html.go
  2. 3 3
      src/ngrok/client/ui/webhttp.go

+ 6 - 6
src/ngrok/client/ui/static/debug.html.go

@@ -3,15 +3,15 @@
 package static
 
 import (
-    "io/ioutil"
+	"io/ioutil"
 )
 
 func ReadFileOrPanic(path string) []byte {
-    bytes, err := ioutil.ReadFile(path)
-    if err != nil {
-        panic(err)
-    }
-    return bytes
+	bytes, err := ioutil.ReadFile(path)
+	if err != nil {
+		panic(err)
+	}
+	return bytes
 }
 
 func BodyHtml() []byte { return ReadFileOrPanic("templates/body.html") }

+ 3 - 3
src/ngrok/client/ui/webhttp.go

@@ -2,7 +2,6 @@
 package ui
 
 import (
-        "strings"
 	"bytes"
 	"encoding/json"
 	"html/template"
@@ -10,9 +9,10 @@ import (
 	"net/http"
 	"net/http/httputil"
 	"net/url"
+	"ngrok/client/ui/static"
 	"ngrok/proto"
 	"ngrok/util"
-        "ngrok/client/ui/static"
+	"strings"
 )
 
 func readBody(r *http.Request) ([]byte, error) {
@@ -155,7 +155,7 @@ func (h *WebHttpView) register() {
 
 		tmpl := template.Must(
 			template.New("page.html").Funcs(funcMap).Parse(string(static.PageHtml())))
-                template.Must(tmpl.Parse(string(static.BodyHtml())))
+		template.Must(tmpl.Parse(string(static.BodyHtml())))
 
 		// write the response
 		if err := tmpl.Execute(w, h); err != nil {