diff --git a/public/test.html b/document_roots/public/test.html
similarity index 100%
rename from public/test.html
rename to document_roots/public/test.html
diff --git a/private/test.html b/document_roots/webhost/test.html
similarity index 100%
rename from private/test.html
rename to document_roots/webhost/test.html
diff --git a/main.go b/main.go
index cebc595..d2317ce 100644
--- a/main.go
+++ b/main.go
@@ -4,21 +4,21 @@ import (
"log"
"net/http"
- "github.com/Ennovar/gPanel/private_server"
- "github.com/Ennovar/gPanel/public_server"
+ "github.com/Ennovar/gPanel/public"
+ "github.com/Ennovar/gPanel/webhost"
)
func main() {
- private := private_server.NewPrivateHost()
- public := public_server.NewPublicWeb()
+ webhost := webhost.NewPrivateHost()
+ public := public.NewPublicWeb()
log.Printf("To Exit: CTRL+C")
go func() {
- log.Print("Listening (private) on localhost:2082, serving out of the private/ directory...")
- http.ListenAndServe("localhost:2082", &private)
+ log.Print("Listening (private) on localhost:2082, serving out of the document_roots/webhost/ directory...")
+ http.ListenAndServe("localhost:2082", &webhost)
}()
- log.Print("Listening (public) on localhost:3000, serving out of the public/ directory...")
+ log.Print("Listening (public) on localhost:3000, serving out of the document_roots/public/ directory...")
http.ListenAndServe("localhost:3000", &public)
}
diff --git a/general/logging/console.go b/pkg/logging/console.go
similarity index 93%
rename from general/logging/console.go
rename to pkg/logging/console.go
index 595c73f..c50243c 100644
--- a/general/logging/console.go
+++ b/pkg/logging/console.go
@@ -5,7 +5,7 @@ import (
"log"
"strings"
- "github.com/Ennovar/gPanel/general/networking"
+ "github.com/Ennovar/gPanel/pkg/networking"
)
const (
diff --git a/general/logging/file.go b/pkg/logging/file.go
similarity index 100%
rename from general/logging/file.go
rename to pkg/logging/file.go
diff --git a/general/networking/ip_address.go b/pkg/networking/ip_address.go
similarity index 100%
rename from general/networking/ip_address.go
rename to pkg/networking/ip_address.go
diff --git a/general/routing/contentTypes.go b/pkg/routing/content_types.go
similarity index 100%
rename from general/routing/contentTypes.go
rename to pkg/routing/content_types.go
diff --git a/general/routing/http_status.go b/pkg/routing/http_status.go
similarity index 100%
rename from general/routing/http_status.go
rename to pkg/routing/http_status.go
diff --git a/public_server/public_server.go b/public/public.go
similarity index 82%
rename from public_server/public_server.go
rename to public/public.go
index 9c6e535..362b6d2 100644
--- a/public_server/public_server.go
+++ b/public/public.go
@@ -1,13 +1,13 @@
-// Package public_server handles the logic of the public facing website
-package public_server
+// Package public handles the logic of the public facing website
+package public
import (
"bufio"
"net/http"
"os"
- "github.com/Ennovar/gPanel/general/logging"
- "github.com/Ennovar/gPanel/general/routing"
+ "github.com/Ennovar/gPanel/pkg/logging"
+ "github.com/Ennovar/gPanel/pkg/routing"
)
type PublicWeb struct {
@@ -17,7 +17,7 @@ type PublicWeb struct {
// NewPublicWeb returns a new PublicWeb type.
func NewPublicWeb() PublicWeb {
return PublicWeb{
- Directory: "public/",
+ Directory: "document_roots/public/",
}
}
diff --git a/private_server/private_server.go b/webhost/webhost.go
similarity index 85%
rename from private_server/private_server.go
rename to webhost/webhost.go
index 0e9fdd4..3ea13e7 100644
--- a/private_server/private_server.go
+++ b/webhost/webhost.go
@@ -1,13 +1,13 @@
-// Package private_server handles the logic of the private_server
-package private_server
+// Package webhost handles the logic of the webhosting panel
+package webhost
import (
"bufio"
"net/http"
"os"
- "github.com/Ennovar/gPanel/general/logging"
- "github.com/Ennovar/gPanel/general/routing"
+ "github.com/Ennovar/gPanel/pkg/logging"
+ "github.com/Ennovar/gPanel/pkg/routing"
)
type PrivateHost struct {
@@ -19,7 +19,7 @@ type PrivateHost struct {
func NewPrivateHost() PrivateHost {
return PrivateHost{
Auth: 1,
- Directory: "private/",
+ Directory: "document_roots/webhost/",
}
}