Rename app->internal

This commit is contained in:
Maximilian 2024-07-10 17:45:04 -05:00
parent ce85d6b77b
commit ce03926ce6
21 changed files with 22 additions and 22 deletions

View File

@ -1,7 +1,7 @@
package database package database
import ( import (
"GoWeb/app" "GoWeb/internal"
"database/sql" "database/sql"
"fmt" "fmt"
_ "github.com/lib/pq" _ "github.com/lib/pq"

View File

@ -1,7 +1,7 @@
package database package database
import ( import (
"GoWeb/app" "GoWeb/internal"
"errors" "errors"
"fmt" "fmt"
"github.com/lib/pq" "github.com/lib/pq"

View File

@ -12,7 +12,7 @@
"HttpPort": "8090" "HttpPort": "8090"
}, },
"Template": { "Template": {
"BaseTemplateName": "app/frontend/templates/base.html", "BaseTemplateName": "internal/frontend/templates/base.html",
"ContentPath": "app/frontend/templates" "ContentPath": "internal/frontend/templates"
} }
} }

View File

@ -1,8 +1,8 @@
package controllers package controllers
import ( import (
"GoWeb/app" "GoWeb/internal"
"GoWeb/app/models" "GoWeb/internal/models"
"GoWeb/security" "GoWeb/security"
"GoWeb/templating" "GoWeb/templating"
"net/http" "net/http"

View File

@ -1,8 +1,8 @@
package controllers package controllers
import ( import (
"GoWeb/app" "GoWeb/internal"
"GoWeb/app/models" "GoWeb/internal/models"
"log/slog" "log/slog"
"net/http" "net/http"
"time" "time"

View File

@ -1,8 +1,8 @@
package models package models
import ( import (
"GoWeb/app"
"GoWeb/database" "GoWeb/database"
"GoWeb/internal"
"time" "time"
) )

View File

@ -1,7 +1,7 @@
package models package models
import ( import (
"GoWeb/app" "GoWeb/internal"
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"log/slog" "log/slog"

View File

@ -1,7 +1,7 @@
package models package models
import ( import (
"GoWeb/app" "GoWeb/internal"
"crypto/sha256" "crypto/sha256"
"encoding/hex" "encoding/hex"
"log/slog" "log/slog"

View File

@ -1,8 +1,8 @@
package routes package routes
import ( import (
"GoWeb/app" "GoWeb/internal"
"GoWeb/app/controllers" "GoWeb/internal/controllers"
"io/fs" "io/fs"
"log/slog" "log/slog"
"net/http" "net/http"

View File

@ -1,9 +1,9 @@
package routes package routes
import ( import (
"GoWeb/app" "GoWeb/internal"
"GoWeb/app/controllers" "GoWeb/internal/controllers"
"GoWeb/app/middleware" "GoWeb/internal/middleware"
"net/http" "net/http"
) )

View File

@ -1,11 +1,11 @@
package main package main
import ( import (
"GoWeb/app"
"GoWeb/app/models"
"GoWeb/app/routes"
"GoWeb/config" "GoWeb/config"
"GoWeb/database" "GoWeb/database"
"GoWeb/internal"
"GoWeb/internal/models"
"GoWeb/internal/routes"
"GoWeb/templating" "GoWeb/templating"
"context" "context"
"embed" "embed"
@ -18,7 +18,7 @@ import (
"time" "time"
) )
//go:embed app/frontend/templates app/frontend/static //go:embed internal/frontend/templates internal/frontend/static
var res embed.FS var res embed.FS
func main() { func main() {

View File

@ -1,7 +1,7 @@
package templating package templating
import ( import (
"GoWeb/app" "GoWeb/internal"
"fmt" "fmt"
"html/template" "html/template"
"io/fs" "io/fs"
@ -9,7 +9,7 @@ import (
"net/http" "net/http"
) )
var templates = make(map[string]*template.Template) // This is only used here, does not need to be in app.Deps var templates = make(map[string]*template.Template) // This is only used here, does not need to be in internal.Deps
func BuildPages(app *app.Deps) error { func BuildPages(app *app.Deps) error {
basePath := app.Config.Template.BaseName basePath := app.Config.Template.BaseName