mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-03-06 11:38:19 +00:00
Categories: Rename exported functions
This commit is contained in:
parent
0ab4bb5846
commit
f9857768b7
@ -12,8 +12,8 @@ import (
|
||||
var categoryToHyphae = map[string]*categoryNode{}
|
||||
var hyphaToCategories = map[string]*hyphaNode{}
|
||||
|
||||
// InitCategories initializes the category system. Call it after the Structure is initialized. This function might terminate the program in case of a bad mood or filesystem faults.
|
||||
func InitCategories() {
|
||||
// Init initializes the category system. Call it after the Structure is initialized. This function might terminate the program in case of a bad mood or filesystem faults.
|
||||
func Init() {
|
||||
var (
|
||||
record, err = readCategoriesFromDisk()
|
||||
)
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// InitCategoriesHandlers initializes HTTP handlers for the given router. Call somewhere in package web.
|
||||
func InitCategoriesHandlers(r *mux.Router) {
|
||||
// InitHandlers initializes HTTP handlers for the given router. Call somewhere in package web.
|
||||
func InitHandlers(r *mux.Router) {
|
||||
r.PathPrefix("/add-to-category").HandlerFunc(handlerAddToCategory).Methods("POST")
|
||||
r.PathPrefix("/remove-from-category").HandlerFunc(handlerRemoveFromCategory).Methods("POST")
|
||||
r.PathPrefix("/category/").HandlerFunc(handlerCategory).Methods("GET")
|
||||
|
2
main.go
2
main.go
@ -51,7 +51,7 @@ func main() {
|
||||
history.InitGitRepo()
|
||||
migration.MigrateRocketsMaybe()
|
||||
shroom.SetHeaderLinks()
|
||||
categories.InitCategories()
|
||||
categories.Init()
|
||||
|
||||
// Static files:
|
||||
static.InitFS(files.StaticFiles())
|
||||
|
@ -110,7 +110,7 @@ func Handler() http.Handler {
|
||||
initStuff(wikiRouter)
|
||||
initSearch(wikiRouter)
|
||||
initBacklinks(wikiRouter)
|
||||
categories.InitCategoriesHandlers(wikiRouter)
|
||||
categories.InitHandlers(wikiRouter)
|
||||
|
||||
// Admin routes.
|
||||
if cfg.UseAuth {
|
||||
|
Loading…
x
Reference in New Issue
Block a user