Rename app->internal
This commit is contained in:
parent
ce85d6b77b
commit
ce03926ce6
@ -1,7 +1,7 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/internal"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
_ "github.com/lib/pq"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/internal"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/lib/pq"
|
||||
|
@ -12,7 +12,7 @@
|
||||
"HttpPort": "8090"
|
||||
},
|
||||
"Template": {
|
||||
"BaseTemplateName": "app/frontend/templates/base.html",
|
||||
"ContentPath": "app/frontend/templates"
|
||||
"BaseTemplateName": "internal/frontend/templates/base.html",
|
||||
"ContentPath": "internal/frontend/templates"
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/app/models"
|
||||
"GoWeb/internal"
|
||||
"GoWeb/internal/models"
|
||||
"GoWeb/security"
|
||||
"GoWeb/templating"
|
||||
"net/http"
|
@ -1,8 +1,8 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/app/models"
|
||||
"GoWeb/internal"
|
||||
"GoWeb/internal/models"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"time"
|
@ -1,8 +1,8 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/database"
|
||||
"GoWeb/internal"
|
||||
"time"
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/internal"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"log/slog"
|
@ -1,7 +1,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/internal"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"log/slog"
|
@ -1,8 +1,8 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/app/controllers"
|
||||
"GoWeb/internal"
|
||||
"GoWeb/internal/controllers"
|
||||
"io/fs"
|
||||
"log/slog"
|
||||
"net/http"
|
@ -1,9 +1,9 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/app/controllers"
|
||||
"GoWeb/app/middleware"
|
||||
"GoWeb/internal"
|
||||
"GoWeb/internal/controllers"
|
||||
"GoWeb/internal/middleware"
|
||||
"net/http"
|
||||
)
|
||||
|
8
main.go
8
main.go
@ -1,11 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/app/models"
|
||||
"GoWeb/app/routes"
|
||||
"GoWeb/config"
|
||||
"GoWeb/database"
|
||||
"GoWeb/internal"
|
||||
"GoWeb/internal/models"
|
||||
"GoWeb/internal/routes"
|
||||
"GoWeb/templating"
|
||||
"context"
|
||||
"embed"
|
||||
@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//go:embed app/frontend/templates app/frontend/static
|
||||
//go:embed internal/frontend/templates internal/frontend/static
|
||||
var res embed.FS
|
||||
|
||||
func main() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package templating
|
||||
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/internal"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/fs"
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"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 {
|
||||
basePath := app.Config.Template.BaseName
|
||||
|
Loading…
Reference in New Issue
Block a user