mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-07 18:30:26 +00:00
Run gofmt
This commit is contained in:
parent
6636fc95a7
commit
33650e965c
@ -1,11 +1,11 @@
|
|||||||
package shroom
|
package shroom
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"bytes"
|
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -92,7 +92,7 @@ func handlerLogout(w http.ResponseWriter, rq *http.Request) {
|
|||||||
var (
|
var (
|
||||||
u = user.FromRequest(rq)
|
u = user.FromRequest(rq)
|
||||||
can = u != nil
|
can = u != nil
|
||||||
lc = l18n.FromRequest(rq)
|
lc = l18n.FromRequest(rq)
|
||||||
)
|
)
|
||||||
w.Header().Set("Content-Type", "text/html;charset=utf-8")
|
w.Header().Set("Content-Type", "text/html;charset=utf-8")
|
||||||
if can {
|
if can {
|
||||||
|
@ -55,7 +55,7 @@ func handlerRecentChanges(w http.ResponseWriter, rq *http.Request) {
|
|||||||
var lc = l18n.FromRequest(rq)
|
var lc = l18n.FromRequest(rq)
|
||||||
util.HTTP200Page(w, views.BaseHTML(
|
util.HTTP200Page(w, views.BaseHTML(
|
||||||
lc.GetPlural("ui.recent_title", n),
|
lc.GetPlural("ui.recent_title", n),
|
||||||
views.RecentChangesHTML(n, lc),
|
views.RecentChangesHTML(n, lc),
|
||||||
lc,
|
lc,
|
||||||
user.FromRequest(rq)))
|
user.FromRequest(rq)))
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
|
||||||
|
"github.com/bouncepaw/mycorrhiza/l18n"
|
||||||
"github.com/bouncepaw/mycorrhiza/shroom"
|
"github.com/bouncepaw/mycorrhiza/shroom"
|
||||||
"github.com/bouncepaw/mycorrhiza/user"
|
"github.com/bouncepaw/mycorrhiza/user"
|
||||||
"github.com/bouncepaw/mycorrhiza/util"
|
"github.com/bouncepaw/mycorrhiza/util"
|
||||||
"github.com/bouncepaw/mycorrhiza/l18n"
|
|
||||||
"github.com/bouncepaw/mycorrhiza/views"
|
"github.com/bouncepaw/mycorrhiza/views"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ func handlerAbout(w http.ResponseWriter, rq *http.Request) {
|
|||||||
w.Header().Set("Content-Type", "text/html;charset=utf-8")
|
w.Header().Set("Content-Type", "text/html;charset=utf-8")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
var (
|
var (
|
||||||
lc = l18n.FromRequest(rq)
|
lc = l18n.FromRequest(rq)
|
||||||
title = lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName})
|
title = lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName})
|
||||||
)
|
)
|
||||||
_, err := io.WriteString(w, views.BaseHTML(title, views.AboutHTML(lc), lc, user.FromRequest(rq)))
|
_, err := io.WriteString(w, views.BaseHTML(title, views.AboutHTML(lc), lc, user.FromRequest(rq)))
|
||||||
|
@ -38,7 +38,7 @@ func httpErr(w http.ResponseWriter, lc *l18n.Localizer, status int, name, title,
|
|||||||
name,
|
name,
|
||||||
lc.Get("ui.error_go_back"),
|
lc.Get("ui.error_go_back"),
|
||||||
),
|
),
|
||||||
lc,
|
lc,
|
||||||
user.EmptyUser(),
|
user.EmptyUser(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user