chore: migrate to standard layout #5

Merged
maks1ms merged 1 commit from migrate-to-standard-layout into main 2024-12-12 07:47:18 +00:00
4 changed files with 13 additions and 10 deletions

View file

@ -1,11 +1,13 @@
package main
import (
"github.com/caarlos0/env/v11"
"log"
"net/http"
"rest_api/models"
"rest_api/router"
"code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models"
"code.alt-gnome.ru/aides-infra/aides-repo-api/internal/router"
"github.com/caarlos0/env/v11"
)
func main() {
@ -18,5 +20,4 @@ func main() {
log.Printf("Сервер запущен на порту: %s", config.Port)
http.ListenAndServe(":"+config.Port, router)
}

11
go.mod
View file

@ -1,10 +1,11 @@
module rest_api
module code.alt-gnome.ru/aides-infra/aides-repo-api
go 1.23.3
require (
github.com/ajg/form v1.5.1 // indirect
github.com/caarlos0/env/v11 v11.2.2 // indirect
github.com/go-chi/chi/v5 v5.1.0 // indirect
github.com/go-chi/render v1.0.3 // indirect
github.com/caarlos0/env/v11 v11.2.2
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/render v1.0.3
)
require github.com/ajg/form v1.5.1 // indirect

View file

@ -7,9 +7,10 @@ import (
"net/http"
"os"
"path"
"rest_api/models" // Импорт пакета с моделями, где определены структуры конфигурации
"strconv"
"code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models"
"github.com/go-chi/render"
"github.com/go-chi/chi/v5" //Импорт пакета chi для маршрутизации