From 283a080a106f7d697d7428c2e4462f0952cb519f Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Tue, 28 Jan 2025 12:45:37 +0200 Subject: [PATCH] move everything to top-level dir --- cmd/legit/main.go | 4 ++-- config.yaml | 4 ++-- {legit/config => config}/config.go | 0 {legit/contrib => contrib}/Dockerfile | 0 {legit/contrib => contrib}/docker-compose.yml | 0 {legit/contrib => contrib}/legit.service | 0 {legit/db => db}/init.go | 0 {legit/db => db}/pubkeys.go | 0 {legit/db => db}/repo.go | 0 {legit/git => git}/diff.go | 0 {legit/git => git}/git.go | 0 {legit/git => git}/repo.go | 0 {legit/git => git}/service/service.go | 0 {legit/git => git}/service/write_flusher.go | 0 {legit/git => git}/tree.go | 0 legit/.gitignore | 2 -- {legit/routes => routes}/auth.go | 2 +- {legit/routes => routes}/auth/auth.go | 0 {legit/routes => routes}/auth/types.go | 0 {legit/routes => routes}/file.go | 2 +- {legit/routes => routes}/git.go | 2 +- {legit/routes => routes}/handler.go | 8 ++++---- {legit/routes => routes}/html_util.go | 0 {legit/routes => routes}/routes.go | 8 ++++---- {legit/routes => routes}/tmpl/tmpl.go | 0 {legit/routes => routes}/util.go | 2 +- {legit/static => static}/legit.png | Bin {legit/static => static}/style.css | 0 {legit/templates => templates}/errors/404.html | 0 {legit/templates => templates}/errors/500.html | 0 {legit/templates => templates}/index.html | 0 {legit/templates => templates}/layouts/head.html | 0 {legit/templates => templates}/layouts/nav.html | 0 .../layouts/repo-header.html | 0 {legit/templates => templates}/repo/commit.html | 0 {legit/templates => templates}/repo/empty.html | 0 {legit/templates => templates}/repo/file.html | 0 {legit/templates => templates}/repo/log.html | 0 {legit/templates => templates}/repo/new.html | 0 {legit/templates => templates}/repo/refs.html | 0 {legit/templates => templates}/repo/repo.html | 0 {legit/templates => templates}/repo/tree.html | 0 {legit/templates => templates}/settings/keys.html | 0 {legit/templates => templates}/user/login.html | 0 44 files changed, 16 insertions(+), 18 deletions(-) rename {legit/config => config}/config.go (100%) rename {legit/contrib => contrib}/Dockerfile (100%) rename {legit/contrib => contrib}/docker-compose.yml (100%) rename {legit/contrib => contrib}/legit.service (100%) rename {legit/db => db}/init.go (100%) rename {legit/db => db}/pubkeys.go (100%) rename {legit/db => db}/repo.go (100%) rename {legit/git => git}/diff.go (100%) rename {legit/git => git}/git.go (100%) rename {legit/git => git}/repo.go (100%) rename {legit/git => git}/service/service.go (100%) rename {legit/git => git}/service/write_flusher.go (100%) rename {legit/git => git}/tree.go (100%) delete mode 100644 legit/.gitignore rename {legit/routes => routes}/auth.go (97%) rename {legit/routes => routes}/auth/auth.go (100%) rename {legit/routes => routes}/auth/types.go (100%) rename {legit/routes => routes}/file.go (98%) rename {legit/routes => routes}/git.go (97%) rename {legit/routes => routes}/handler.go (93%) rename {legit/routes => routes}/html_util.go (100%) rename {legit/routes => routes}/routes.go (98%) rename {legit/routes => routes}/tmpl/tmpl.go (100%) rename {legit/routes => routes}/util.go (98%) rename {legit/static => static}/legit.png (100%) rename {legit/static => static}/style.css (100%) rename {legit/templates => templates}/errors/404.html (100%) rename {legit/templates => templates}/errors/500.html (100%) rename {legit/templates => templates}/index.html (100%) rename {legit/templates => templates}/layouts/head.html (100%) rename {legit/templates => templates}/layouts/nav.html (100%) rename {legit/templates => templates}/layouts/repo-header.html (100%) rename {legit/templates => templates}/repo/commit.html (100%) rename {legit/templates => templates}/repo/empty.html (100%) rename {legit/templates => templates}/repo/file.html (100%) rename {legit/templates => templates}/repo/log.html (100%) rename {legit/templates => templates}/repo/new.html (100%) rename {legit/templates => templates}/repo/refs.html (100%) rename {legit/templates => templates}/repo/repo.html (100%) rename {legit/templates => templates}/repo/tree.html (100%) rename {legit/templates => templates}/settings/keys.html (100%) rename {legit/templates => templates}/user/login.html (100%) diff --git a/cmd/legit/main.go b/cmd/legit/main.go index b3b2e34..7bdef06 100644 --- a/cmd/legit/main.go +++ b/cmd/legit/main.go @@ -8,8 +8,8 @@ import ( "net/http" "os" - "github.com/icyphox/bild/legit/config" - "github.com/icyphox/bild/legit/routes" + "github.com/icyphox/bild/config" + "github.com/icyphox/bild/routes" ) func main() { diff --git a/config.yaml b/config.yaml index a150c6a..8ba1c30 100644 --- a/config.yaml +++ b/config.yaml @@ -9,8 +9,8 @@ repo: - master - main dirs: - templates: ./legit/templates - static: ./legit/static + templates: ./templates + static: ./static meta: title: icy does git description: come get your free software diff --git a/legit/config/config.go b/config/config.go similarity index 100% rename from legit/config/config.go rename to config/config.go diff --git a/legit/contrib/Dockerfile b/contrib/Dockerfile similarity index 100% rename from legit/contrib/Dockerfile rename to contrib/Dockerfile diff --git a/legit/contrib/docker-compose.yml b/contrib/docker-compose.yml similarity index 100% rename from legit/contrib/docker-compose.yml rename to contrib/docker-compose.yml diff --git a/legit/contrib/legit.service b/contrib/legit.service similarity index 100% rename from legit/contrib/legit.service rename to contrib/legit.service diff --git a/legit/db/init.go b/db/init.go similarity index 100% rename from legit/db/init.go rename to db/init.go diff --git a/legit/db/pubkeys.go b/db/pubkeys.go similarity index 100% rename from legit/db/pubkeys.go rename to db/pubkeys.go diff --git a/legit/db/repo.go b/db/repo.go similarity index 100% rename from legit/db/repo.go rename to db/repo.go diff --git a/legit/git/diff.go b/git/diff.go similarity index 100% rename from legit/git/diff.go rename to git/diff.go diff --git a/legit/git/git.go b/git/git.go similarity index 100% rename from legit/git/git.go rename to git/git.go diff --git a/legit/git/repo.go b/git/repo.go similarity index 100% rename from legit/git/repo.go rename to git/repo.go diff --git a/legit/git/service/service.go b/git/service/service.go similarity index 100% rename from legit/git/service/service.go rename to git/service/service.go diff --git a/legit/git/service/write_flusher.go b/git/service/write_flusher.go similarity index 100% rename from legit/git/service/write_flusher.go rename to git/service/write_flusher.go diff --git a/legit/git/tree.go b/git/tree.go similarity index 100% rename from legit/git/tree.go rename to git/tree.go diff --git a/legit/.gitignore b/legit/.gitignore deleted file mode 100644 index 46ecc00..0000000 --- a/legit/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -legit -result diff --git a/legit/routes/auth.go b/routes/auth.go similarity index 97% rename from legit/routes/auth.go rename to routes/auth.go index 66e7ea8..242f59a 100644 --- a/legit/routes/auth.go +++ b/routes/auth.go @@ -7,7 +7,7 @@ import ( comatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/xrpc" - rauth "github.com/icyphox/bild/legit/routes/auth" + rauth "github.com/icyphox/bild/routes/auth" ) const ( diff --git a/legit/routes/auth/auth.go b/routes/auth/auth.go similarity index 100% rename from legit/routes/auth/auth.go rename to routes/auth/auth.go diff --git a/legit/routes/auth/types.go b/routes/auth/types.go similarity index 100% rename from legit/routes/auth/types.go rename to routes/auth/types.go diff --git a/legit/routes/file.go b/routes/file.go similarity index 98% rename from legit/routes/file.go rename to routes/file.go index 03a5eb1..ee79b09 100644 --- a/legit/routes/file.go +++ b/routes/file.go @@ -11,7 +11,7 @@ import ( "github.com/alecthomas/chroma/v2/formatters/html" "github.com/alecthomas/chroma/v2/lexers" "github.com/alecthomas/chroma/v2/styles" - "github.com/icyphox/bild/legit/git" + "github.com/icyphox/bild/git" ) func (h *Handle) listFiles(files []git.NiceTree, data map[string]any, w http.ResponseWriter) { diff --git a/legit/routes/git.go b/routes/git.go similarity index 97% rename from legit/routes/git.go rename to routes/git.go index b380bed..b6e781b 100644 --- a/legit/routes/git.go +++ b/routes/git.go @@ -7,7 +7,7 @@ import ( "net/http" "path/filepath" - "github.com/icyphox/bild/legit/git/service" + "github.com/icyphox/bild/git/service" ) func (d *Handle) InfoRefs(w http.ResponseWriter, r *http.Request) { diff --git a/legit/routes/handler.go b/routes/handler.go similarity index 93% rename from legit/routes/handler.go rename to routes/handler.go index a19b221..a3002e7 100644 --- a/legit/routes/handler.go +++ b/routes/handler.go @@ -9,10 +9,10 @@ import ( _ "github.com/bluesky-social/indigo/xrpc" "github.com/go-chi/chi/v5" "github.com/gorilla/sessions" - "github.com/icyphox/bild/legit/config" - "github.com/icyphox/bild/legit/db" - "github.com/icyphox/bild/legit/routes/auth" - "github.com/icyphox/bild/legit/routes/tmpl" + "github.com/icyphox/bild/config" + "github.com/icyphox/bild/db" + "github.com/icyphox/bild/routes/auth" + "github.com/icyphox/bild/routes/tmpl" ) // Checks for gitprotocol-http(5) specific smells; if found, passes diff --git a/legit/routes/html_util.go b/routes/html_util.go similarity index 100% rename from legit/routes/html_util.go rename to routes/html_util.go diff --git a/legit/routes/routes.go b/routes/routes.go similarity index 98% rename from legit/routes/routes.go rename to routes/routes.go index 845517a..e33483a 100644 --- a/legit/routes/routes.go +++ b/routes/routes.go @@ -18,10 +18,10 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/gorilla/sessions" - "github.com/icyphox/bild/legit/config" - "github.com/icyphox/bild/legit/db" - "github.com/icyphox/bild/legit/git" - "github.com/icyphox/bild/legit/routes/auth" + "github.com/icyphox/bild/config" + "github.com/icyphox/bild/db" + "github.com/icyphox/bild/git" + "github.com/icyphox/bild/routes/auth" "github.com/russross/blackfriday/v2" "golang.org/x/crypto/ssh" ) diff --git a/legit/routes/tmpl/tmpl.go b/routes/tmpl/tmpl.go similarity index 100% rename from legit/routes/tmpl/tmpl.go rename to routes/tmpl/tmpl.go diff --git a/legit/routes/util.go b/routes/util.go similarity index 98% rename from legit/routes/util.go rename to routes/util.go index 382c67f..b052561 100644 --- a/legit/routes/util.go +++ b/routes/util.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/go-chi/chi/v5" - "github.com/icyphox/bild/legit/git" + "github.com/icyphox/bild/git" "github.com/microcosm-cc/bluemonday" ) diff --git a/legit/static/legit.png b/static/legit.png similarity index 100% rename from legit/static/legit.png rename to static/legit.png diff --git a/legit/static/style.css b/static/style.css similarity index 100% rename from legit/static/style.css rename to static/style.css diff --git a/legit/templates/errors/404.html b/templates/errors/404.html similarity index 100% rename from legit/templates/errors/404.html rename to templates/errors/404.html diff --git a/legit/templates/errors/500.html b/templates/errors/500.html similarity index 100% rename from legit/templates/errors/500.html rename to templates/errors/500.html diff --git a/legit/templates/index.html b/templates/index.html similarity index 100% rename from legit/templates/index.html rename to templates/index.html diff --git a/legit/templates/layouts/head.html b/templates/layouts/head.html similarity index 100% rename from legit/templates/layouts/head.html rename to templates/layouts/head.html diff --git a/legit/templates/layouts/nav.html b/templates/layouts/nav.html similarity index 100% rename from legit/templates/layouts/nav.html rename to templates/layouts/nav.html diff --git a/legit/templates/layouts/repo-header.html b/templates/layouts/repo-header.html similarity index 100% rename from legit/templates/layouts/repo-header.html rename to templates/layouts/repo-header.html diff --git a/legit/templates/repo/commit.html b/templates/repo/commit.html similarity index 100% rename from legit/templates/repo/commit.html rename to templates/repo/commit.html diff --git a/legit/templates/repo/empty.html b/templates/repo/empty.html similarity index 100% rename from legit/templates/repo/empty.html rename to templates/repo/empty.html diff --git a/legit/templates/repo/file.html b/templates/repo/file.html similarity index 100% rename from legit/templates/repo/file.html rename to templates/repo/file.html diff --git a/legit/templates/repo/log.html b/templates/repo/log.html similarity index 100% rename from legit/templates/repo/log.html rename to templates/repo/log.html diff --git a/legit/templates/repo/new.html b/templates/repo/new.html similarity index 100% rename from legit/templates/repo/new.html rename to templates/repo/new.html diff --git a/legit/templates/repo/refs.html b/templates/repo/refs.html similarity index 100% rename from legit/templates/repo/refs.html rename to templates/repo/refs.html diff --git a/legit/templates/repo/repo.html b/templates/repo/repo.html similarity index 100% rename from legit/templates/repo/repo.html rename to templates/repo/repo.html diff --git a/legit/templates/repo/tree.html b/templates/repo/tree.html similarity index 100% rename from legit/templates/repo/tree.html rename to templates/repo/tree.html diff --git a/legit/templates/settings/keys.html b/templates/settings/keys.html similarity index 100% rename from legit/templates/settings/keys.html rename to templates/settings/keys.html diff --git a/legit/templates/user/login.html b/templates/user/login.html similarity index 100% rename from legit/templates/user/login.html rename to templates/user/login.html -- 2.51.2