1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-05 17:40:26 +00:00

Run gofmt

This commit is contained in:
kez 2022-08-14 15:43:19 -07:00 committed by Timur Ismagilov
parent c1946d8849
commit 9275c9d3f3
2 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,7 @@ func handlerRemoveMedia(w http.ResponseWriter, rq *http.Request) {
fmt.Sprintf(lc.Get("ui.ask_remove_media"), util.BeautifulName(h.CanonicalName())),
hypview.RemoveMediaAsk(rq, h.CanonicalName()),
map[string]string{},
))
))
return
}
switch h := h.(type) {
@ -218,7 +218,7 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) {
"",
mycomarkup.BlocksToHTML(ctx, mycomarkup.BlockTree(ctx))),
map[string]string{},
))
))
} else {
http.Redirect(w, rq, "/hypha/"+hyphaName, http.StatusSeeOther)
}

View File

@ -3,11 +3,11 @@ package web
import (
"fmt"
"github.com/bouncepaw/mycomarkup/v5"
"github.com/bouncepaw/mycorrhiza/categories"
"github.com/bouncepaw/mycorrhiza/files"
views2 "github.com/bouncepaw/mycorrhiza/hypview"
"github.com/bouncepaw/mycorrhiza/mycoopts"
"github.com/bouncepaw/mycorrhiza/viewutil"
"github.com/bouncepaw/mycorrhiza/categories"
"io"
"log"
"net/http"
@ -51,7 +51,7 @@ func handlerMedia(w http.ResponseWriter, rq *http.Request) {
lc.Get("ui.media_title", &l18n.Replacements{"name": util.BeautifulName(hyphaName)}),
views2.MediaMenu(rq, h, u),
map[string]string{},
))
))
}
// handlerRevisionText sends Mycomarkup text of the hypha at the given revision. See also: handlerRevision, handlerText.
@ -211,14 +211,14 @@ func handlerHypha(w http.ResponseWriter, rq *http.Request) {
contents = mycoopts.Media(h, lc) + contents
}
category_list := ":" + strings.Join(categories.CategoriesWithHypha(h.CanonicalName()), ":") + ":"
category_list := ":" + strings.Join(categories.CategoriesWithHypha(h.CanonicalName()), ":") + ":"
util.HTTP200Page(w,
viewutil.Base(
viewutil.MetaFrom(w, rq),
util.BeautifulName(hyphaName),
views2.Hypha(viewutil.MetaFrom(w, rq), h, contents),
map[string]string{"cats": category_list},
map[string]string{"cats": category_list},
openGraph))
}
}