Goit

Simple and lightweight Git web server
git clone http://git.omkov.net/Goit
Log | Tree | Refs | README | Download

AuthorJakob Wakeling <[email protected]>
Date2023-11-05 02:39:31
Commit945fd713f4c81b269b0bb9854f14e362a60aa2af
Parentd314664e5432e372cc8908e277f84fc373799af6

Adjust project structure

Diffstat

M Makefile | 2 +-
R main.go -> src/main.go | 2 +-
R src/admin.go -> src/goit/admin.go | 0
R src/auth.go -> src/goit/auth.go | 0
R src/auth_test.go -> src/goit/auth_test.go | 2 +-
R src/git.go -> src/goit/git.go | 0
R src/goit.go -> src/goit/goit.go | 0
R src/http.go -> src/goit/http.go | 0
R src/index.go -> src/goit/index.go | 0
R src/log.go -> src/goit/log.go | 0
R src/repo.go -> src/goit/repo.go | 0
M src/repo/commit.go | 2 +-
M src/repo/create.go | 2 +-
M src/repo/edit.go | 2 +-
M src/repo/file.go | 2 +-
M src/repo/log.go | 2 +-
M src/repo/raw.go | 2 +-
M src/repo/refs.go | 2 +-
M src/repo/tree.go | 2 +-
R src/user.go -> src/goit/user.go | 0
M src/user/edit.go | 2 +-
M src/user/login.go | 2 +-
M src/user/sessions.go | 2 +-

23 files changed, 14 insertions, 14 deletions

diff --git a/Makefile b/Makefile
index 4f0153a..a262d64 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ PROGRAM = "goit"
 VERSION = "0.0.0"
 
 build: ## Build the project
-	@go build -ldflags "-X $(MODULE)/res.Version=$(VERSION)" -o ./bin/$(PROGRAM) .
+	@go build -ldflags "-X $(MODULE)/res.Version=$(VERSION)" -o ./bin/$(PROGRAM) ./src
 
 test: ## Run unit tests
 	@go test ./...
diff --git a/src/admin.go b/src/goit/admin.go
similarity index 100%
rename from src/admin.go
rename to src/goit/admin.go
diff --git a/src/auth.go b/src/goit/auth.go
similarity index 100%
rename from src/auth.go
rename to src/goit/auth.go
diff --git a/src/auth_test.go b/src/goit/auth_test.go
similarity index 97%
rename from src/auth_test.go
rename to src/goit/auth_test.go
index 7560460..4a129d9 100644
--- a/src/auth_test.go
+++ b/src/goit/auth_test.go
@@ -7,7 +7,7 @@ import (
 	"testing"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 )
 
 func TestNewSession(t *testing.T) {
diff --git a/src/git.go b/src/goit/git.go
similarity index 100%
rename from src/git.go
rename to src/goit/git.go
diff --git a/src/goit.go b/src/goit/goit.go
similarity index 100%
rename from src/goit.go
rename to src/goit/goit.go
diff --git a/src/http.go b/src/goit/http.go
similarity index 100%
rename from src/http.go
rename to src/goit/http.go
diff --git a/src/index.go b/src/goit/index.go
similarity index 100%
rename from src/index.go
rename to src/goit/index.go
diff --git a/src/log.go b/src/goit/log.go
similarity index 100%
rename from src/log.go
rename to src/goit/log.go
diff --git a/src/repo.go b/src/goit/repo.go
similarity index 100%
rename from src/repo.go
rename to src/goit/repo.go
diff --git a/src/user.go b/src/goit/user.go
similarity index 100%
rename from src/user.go
rename to src/goit/user.go
diff --git a/main.go b/src/main.go
similarity index 99%
rename from main.go
rename to src/main.go
index 57acc0c..75c4ac7 100644
--- a/main.go
+++ b/src/main.go
@@ -12,7 +12,7 @@ import (
 	"time"
 
 	"github.com/Jamozed/Goit/res"
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/repo"
 	"github.com/Jamozed/Goit/src/user"
 	"github.com/gorilla/mux"
diff --git a/src/repo/commit.go b/src/repo/commit.go
index 9ee34c7..914ca3c 100644
--- a/src/repo/commit.go
+++ b/src/repo/commit.go
@@ -11,7 +11,7 @@ import (
 	"strings"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/buildkite/terminal-to-html/v3"
 	"github.com/go-git/go-git/v5"
diff --git a/src/repo/create.go b/src/repo/create.go
index 25da57d..af6131c 100644
--- a/src/repo/create.go
+++ b/src/repo/create.go
@@ -5,7 +5,7 @@ import (
 	"net/http"
 	"slices"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 )
 
 func HandleCreate(w http.ResponseWriter, r *http.Request) {
diff --git a/src/repo/edit.go b/src/repo/edit.go
index 0233f99..dd92c3b 100644
--- a/src/repo/edit.go
+++ b/src/repo/edit.go
@@ -8,7 +8,7 @@ import (
 	"path"
 	"slices"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
diff --git a/src/repo/file.go b/src/repo/file.go
index 54f0457..18898b1 100644
--- a/src/repo/file.go
+++ b/src/repo/file.go
@@ -8,7 +8,7 @@ import (
 	"path"
 	"strings"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/dustin/go-humanize"
 	"github.com/go-git/go-git/v5"
diff --git a/src/repo/log.go b/src/repo/log.go
index 1f667a3..001441e 100644
--- a/src/repo/log.go
+++ b/src/repo/log.go
@@ -9,7 +9,7 @@ import (
 	"strings"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
diff --git a/src/repo/raw.go b/src/repo/raw.go
index 5a16a31..ca189a2 100644
--- a/src/repo/raw.go
+++ b/src/repo/raw.go
@@ -6,7 +6,7 @@ import (
 	"log"
 	"net/http"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
 	"github.com/go-git/go-git/v5/plumbing/object"
diff --git a/src/repo/refs.go b/src/repo/refs.go
index 164a51d..f5416d0 100644
--- a/src/repo/refs.go
+++ b/src/repo/refs.go
@@ -8,7 +8,7 @@ import (
 	"strings"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
diff --git a/src/repo/tree.go b/src/repo/tree.go
index 9c78912..06a5c98 100644
--- a/src/repo/tree.go
+++ b/src/repo/tree.go
@@ -8,7 +8,7 @@ import (
 	"sort"
 	"strings"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 	"github.com/dustin/go-humanize"
 	"github.com/go-git/go-git/v5"
diff --git a/src/user/edit.go b/src/user/edit.go
index bdd6f97..1420054 100644
--- a/src/user/edit.go
+++ b/src/user/edit.go
@@ -7,7 +7,7 @@ import (
 	"net/http"
 	"slices"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 )
 
 func HandleEdit(w http.ResponseWriter, r *http.Request) {
diff --git a/src/user/login.go b/src/user/login.go
index f307e5d..2d031f6 100644
--- a/src/user/login.go
+++ b/src/user/login.go
@@ -11,7 +11,7 @@ import (
 	"net/http"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 )
 
 func HandleLogin(w http.ResponseWriter, r *http.Request) {
diff --git a/src/user/sessions.go b/src/user/sessions.go
index 7a6a041..b046091 100644
--- a/src/user/sessions.go
+++ b/src/user/sessions.go
@@ -7,7 +7,7 @@ import (
 	"strconv"
 	"time"
 
-	goit "github.com/Jamozed/Goit/src"
+	"github.com/Jamozed/Goit/src/goit"
 	"github.com/Jamozed/Goit/src/util"
 )