diff options
| author | rtz12 <koenig@fagott.pw> | 2016-10-03 12:34:36 (UTC) |
|---|---|---|
| committer | rtz12 <koenig@fagott.pw> | 2016-10-03 12:34:36 (UTC) |
| commit | c1d895a7db943b758bfbf214c3727569976f85e0 (patch) | |
| tree | 09d50f05049095b92456c78b3df7fb074fbd53e3 /main.go | |
| parent | 5997487fc5cc2126fb5afa12b75b67f3985e11d2 (diff) | |
Formatierung gefixt und go fmt
Ein gewisser jemand sollte endlich mal seinen Editor richtig konfigurieren
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -15,18 +15,19 @@ import ( | |||
| 15 | "fagott.pw/grilist/modules/tags" | 15 | "fagott.pw/grilist/modules/tags" |
| 16 | "fagott.pw/grilist/modules/user" | 16 | "fagott.pw/grilist/modules/user" |
| 17 | 17 | ||
| 18 | "strings" | ||
| 19 | |||
| 18 | "github.com/julienschmidt/httprouter" | 20 | "github.com/julienschmidt/httprouter" |
| 19 | _ "github.com/lib/pq" | 21 | _ "github.com/lib/pq" |
| 20 | "strings" | ||
| 21 | ) | 22 | ) |
| 22 | 23 | ||
| 23 | var app *grilist.Grilist | 24 | var app *grilist.Grilist |
| 24 | 25 | ||
| 25 | func index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { | 26 | func index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { |
| 26 | if strings.Index(r.Referer(), "127.0.0.1") != -1 { | 27 | if strings.Index(r.Referer(), "127.0.0.1") != -1 { |
| 27 | w.WriteHeader(200) | 28 | w.WriteHeader(200) |
| 28 | return | 29 | return |
| 29 | } | 30 | } |
| 30 | http.Redirect(w, r, "/dashboard", 301) | 31 | http.Redirect(w, r, "/dashboard", 301) |
| 31 | } | 32 | } |
| 32 | 33 | ||
