Benenne Packages konsistent und füge go.mod und go.sum hinzu.

This commit is contained in:
Gonne 2022-09-20 12:21:01 +02:00
parent 02cac422f4
commit fef8224984
20 changed files with 38 additions and 34 deletions

4
.gitignore vendored
View File

@ -4,7 +4,7 @@
*.dll
*.so
*.dylib
sprechstundentool
officeHours
#Databases
*.db
@ -20,5 +20,3 @@ vendor/
# Go workspace file
go.work
go.mod
go.sum

View File

@ -13,8 +13,8 @@
},
"mailer": {
"type": "Stdout",
"fromAddress": "sprechstunden@localhost",
"fromName": "Sprechstunden <sprechstunden@localhost>",
"fromAddress": "officeHours@localhost",
"fromName": "Office hours <officeHours@localhost>",
"smtpHost": "localhost",
"smtpPort": 25,
"smtpUseAuth": false,

View File

@ -5,8 +5,8 @@ import (
"log"
"net/http"
"net/mail"
"sprechstundentool/config"
"sprechstundentool/models"
"officeHours/config"
"officeHours/models"
"strconv"
"strings"
)

View File

@ -1,8 +1,8 @@
package controllers
import (
"sprechstundentool/config"
"sprechstundentool/models"
"officeHours/config"
"officeHours/models"
)
// BaseHandler will hold everything that controller needs

View File

@ -3,7 +3,7 @@ package controllers
import (
"net/http"
"sprechstundentool/models"
"officeHours/models"
"strconv"
)

View File

@ -4,7 +4,7 @@ import (
"fmt"
"html/template"
"net/http"
"sprechstundentool/models"
"officeHours/models"
"strconv"
)

View File

@ -2,7 +2,7 @@ package controllers
import (
"html/template"
"sprechstundentool/models"
"officeHours/models"
)
var Templates, _ = template.Must(template.ParseFiles(

View File

@ -5,7 +5,7 @@ import (
"bytes"
"fmt"
"html/template"
"sprechstundentool/models"
"officeHours/models"
)
func (b *BaseHandler) GetTimetable(officeHours []models.OfficeHour) (timetable map[models.Date]map[int]models.OfficeHour, slots []int) {

6
doc.go
View File

@ -1,6 +0,0 @@
// sprechstundentool project doc.go
/*
sprechstundentool document
*/
package main

7
go.mod Normal file
View File

@ -0,0 +1,7 @@
module officeHours
go 1.18
require github.com/mattn/go-sqlite3 v1.14.15
require github.com/go-sql-driver/mysql v1.6.0

4
go.sum Normal file
View File

@ -0,0 +1,4 @@
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=

View File

@ -8,10 +8,10 @@ import (
"log/syslog"
"net/http"
"os"
"sprechstundentool/config"
"sprechstundentool/controllers"
"sprechstundentool/repositories"
"sprechstundentool/sqldb"
"officeHours/config"
"officeHours/controllers"
"officeHours/repositories"
"officeHours/sqldb"
)
func main() {

View File

@ -3,7 +3,7 @@ package repositories
import (
"database/sql"
"sprechstundentool/models"
"officeHours/models"
)
type CourseRepo struct {

View File

@ -4,8 +4,8 @@ package repositories
import (
"database/sql"
"fmt"
"sprechstundentool/config"
"sprechstundentool/models"
"officeHours/config"
"officeHours/models"
)
type OfficeHourRepo struct {

View File

@ -9,9 +9,9 @@ import (
"log"
"math/big"
"net/smtp"
"sprechstundentool/config"
"sprechstundentool/controllers"
"sprechstundentool/models"
"officeHours/config"
"officeHours/controllers"
"officeHours/models"
)
type RequestRepo struct {

View File

@ -3,7 +3,7 @@ package repositories
import (
"database/sql"
"sprechstundentool/models"
"officeHours/models"
)
type RoomRepo struct {

View File

@ -3,7 +3,7 @@ package repositories
import (
"database/sql"
"sprechstundentool/models"
"officeHours/models"
)
type TutorRepo struct {

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"fmt"
"log"
"sprechstundentool/config"
"officeHours/config"
_ "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3"

View File

@ -5,7 +5,8 @@
{{template "head.html" .}}
</head>
<body>
Du solltest eine Mail mit einem Bestätigungslink erhalten haben.
Du solltest eine Mail mit einem Bestätigungslink erhalten haben. <br />
Sie wurde an die Adresse geschickt, mit der die Sprechstunde angelegt wurde.
<br />
{{template "footer.html" .}}
</body>