ch4.5
This commit is contained in:
@@ -7,12 +7,15 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"gitea.local.lab/Lbenedar/snippetbox/internal/models"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
type application struct {
|
||||
errorLog *log.Logger
|
||||
infoLog *log.Logger
|
||||
snippets *models.SnippetModel
|
||||
}
|
||||
|
||||
type config struct {
|
||||
@@ -40,6 +43,7 @@ func main() {
|
||||
app := &application{
|
||||
errorLog: errorLog,
|
||||
infoLog: infoLog,
|
||||
snippets: &models.SnippetModel{DB: db},
|
||||
}
|
||||
|
||||
srv := &http.Server{
|
||||
|
||||
Reference in New Issue
Block a user