some improvements

This commit is contained in:
ston1th 2019-08-26 19:58:31 +02:00
commit 58a0dc36d5
25 changed files with 233 additions and 105 deletions

View file

@ -12,14 +12,14 @@ const (
TagsURI = "/tags"
UserURI = "/user"
RawPrefix = "/raw"
IndexPrefix = "/index"
ReindexPrefix = "/reindex"
UploadPrefix = "/upload"
NewPrefix = "/new"
MovePrefix = "/move"
TagsPrefix = "/tags"
DeletePrefix = "/delete"
RawPrefix = "/raw"
IndexPrefix = "/index"
RetagPrefix = "/retag"
UploadPrefix = "/upload"
NewPrefix = "/new"
MovePrefix = "/move"
TagsPrefix = "/tags"
DeletePrefix = "/delete"
Favicon = "/favicon.ico"
BootstrapCSS = "/bootstrap.css"

View file

@ -30,6 +30,10 @@ type Tag struct {
type Tags []Tag
func (t Tags) Len() int { return len(t) }
func (t Tags) Swap(i, j int) { t[i], t[j] = t[j], t[i] }
func (t Tags) Less(i, j int) bool { return t[i].Name < t[j].Name }
type RTag struct {
Name string
Regex *regexp.Regexp