From f47bf08edcb6b1010b84d0064b554e60522eeba2 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sun, 28 Jul 2024 15:09:34 +0300 Subject: [PATCH] Internalize trauma --- categories/views.go | 45 ------------------- .../categories}/categories.go | 0 {categories => internal/categories}/files.go | 0 internal/shroom/delete.go | 2 +- internal/shroom/rename.go | 2 +- main.go | 2 +- web/cats.go | 2 +- web/readers.go | 2 +- 8 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 categories/views.go rename {categories => internal/categories}/categories.go (100%) rename {categories => internal/categories}/files.go (100%) diff --git a/categories/views.go b/categories/views.go deleted file mode 100644 index 0ceb0e5..0000000 --- a/categories/views.go +++ /dev/null @@ -1,45 +0,0 @@ -package categories - -import ( - "github.com/bouncepaw/mycorrhiza/web/viewutil" -) - -const ruTranslation = ` -{{define "empty cat"}}{{end}} -{{define "cat"}}{{end}} -{{define "hypha name"}}{{end}} -{{define "categories"}}Категории{{end}} -{{define "placeholder"}}Название категории...{{end}} -{{define "remove from category title"}}Убрать гифу из этой категории{{end}} -{{define "add to category title"}}{{end}} -{{define "category list"}}{{end}} -{{define "no categories"}}{{end}} -{{define "category x"}}{{end}} - -{{define "edit category x"}}{{end}} -{{define "edit category heading"}}{{end}} -{{define "add"}}{{end}} -{{define "remove hyphae"}}{{end}} -{{define "remove"}}{{end}} -{{define "edit"}}{{end}} -` - -type catData struct { - *viewutil.BaseData - CatName string - Hyphae []string - GivenPermissionToModify bool -} - -func categoryPage(meta viewutil.Meta, catName string) { - -} - -type listData struct { - *viewutil.BaseData - Categories []string -} - -func categoryList(meta viewutil.Meta) { - -} diff --git a/categories/categories.go b/internal/categories/categories.go similarity index 100% rename from categories/categories.go rename to internal/categories/categories.go diff --git a/categories/files.go b/internal/categories/files.go similarity index 100% rename from categories/files.go rename to internal/categories/files.go diff --git a/internal/shroom/delete.go b/internal/shroom/delete.go index 34ff6cd..701fd0c 100644 --- a/internal/shroom/delete.go +++ b/internal/shroom/delete.go @@ -2,9 +2,9 @@ package shroom import ( "fmt" - "github.com/bouncepaw/mycorrhiza/categories" "github.com/bouncepaw/mycorrhiza/history" "github.com/bouncepaw/mycorrhiza/internal/backlinks" + "github.com/bouncepaw/mycorrhiza/internal/categories" hyphae2 "github.com/bouncepaw/mycorrhiza/internal/hyphae" "github.com/bouncepaw/mycorrhiza/internal/user" ) diff --git a/internal/shroom/rename.go b/internal/shroom/rename.go index dc760e8..3aeeeb7 100644 --- a/internal/shroom/rename.go +++ b/internal/shroom/rename.go @@ -3,8 +3,8 @@ package shroom import ( "errors" "fmt" - "github.com/bouncepaw/mycorrhiza/categories" "github.com/bouncepaw/mycorrhiza/internal/backlinks" + "github.com/bouncepaw/mycorrhiza/internal/categories" "github.com/bouncepaw/mycorrhiza/internal/cfg" "github.com/bouncepaw/mycorrhiza/internal/files" hyphae2 "github.com/bouncepaw/mycorrhiza/internal/hyphae" diff --git a/main.go b/main.go index 3ed5f5d..4028464 100644 --- a/main.go +++ b/main.go @@ -5,10 +5,10 @@ package main import ( + "github.com/bouncepaw/mycorrhiza/internal/categories" "log" "os" - "github.com/bouncepaw/mycorrhiza/categories" "github.com/bouncepaw/mycorrhiza/history" "github.com/bouncepaw/mycorrhiza/internal/backlinks" "github.com/bouncepaw/mycorrhiza/internal/cfg" diff --git a/web/cats.go b/web/cats.go index 060c2f8..47b1d7f 100644 --- a/web/cats.go +++ b/web/cats.go @@ -1,7 +1,7 @@ package web import ( - "github.com/bouncepaw/mycorrhiza/categories" + "github.com/bouncepaw/mycorrhiza/internal/categories" "io" "log" "log/slog" diff --git a/web/readers.go b/web/readers.go index 44e51ff..0f8363c 100644 --- a/web/readers.go +++ b/web/readers.go @@ -3,9 +3,9 @@ package web import ( "fmt" "git.sr.ht/~bouncepaw/mycomarkup/v5" - "github.com/bouncepaw/mycorrhiza/categories" "github.com/bouncepaw/mycorrhiza/hypview" "github.com/bouncepaw/mycorrhiza/internal/backlinks" + "github.com/bouncepaw/mycorrhiza/internal/categories" "github.com/bouncepaw/mycorrhiza/internal/cfg" "github.com/bouncepaw/mycorrhiza/internal/files" "github.com/bouncepaw/mycorrhiza/internal/hyphae"