diff --git a/shroom/rename.go b/shroom/rename.go index aedf968..823ca99 100644 --- a/shroom/rename.go +++ b/shroom/rename.go @@ -24,10 +24,10 @@ func canRenameThisToThat(oh *hyphae.Hypha, nh *hyphae.Hypha, u *user.User) (errt if !hyphae.HyphaPattern.MatchString(nh.Name) { rejectRenameLog(oh, u, fmt.Sprintf("new name ā€˜%sā€™ invalid", nh.Name)) - return "Invalid name", errors.New("Invalid new name. Names cannot contain characters ^?!:#@><*|\"\\'&%") + return "Invalid name", errors.New("Invalid new name. Names cannot contain characters ^?!:#@><*|\"\\'&%") } - return "", nil + return "", nil } // RenameHypha renames hypha from old name `hyphaName` to `newName` and makes a history record about that. If `recursive` is `true`, its subhyphae will be renamed the same way. diff --git a/util/util.go b/util/util.go index 121e2da..7528364 100644 --- a/util/util.go +++ b/util/util.go @@ -152,7 +152,7 @@ func (f FormData) Get(key string) string { return f.fields[key] } -// Put writes a form value for provided key +// Put writes a form value for provided key func (f FormData) Put(key, value string) { f.fields[key] = value } diff --git a/web/web.go b/web/web.go index d19a0c5..41afc4d 100644 --- a/web/web.go +++ b/web/web.go @@ -74,7 +74,7 @@ func handlerRobotsTxt(w http.ResponseWriter, rq *http.Request) { file.Close() } -// Handler initializes +// Handler initializes and returns the HTTP router based on the configuration. func Handler() http.Handler { router := mux.NewRouter() router.Use(func(next http.Handler) http.Handler {