-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iter9 #9
base: main
Are you sure you want to change the base?
Iter9 #9
Conversation
Small storage fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сам код написан хорошо, но он написан в нектором структурно-функциональном стиле.
Сейчас ты хранишь только в памяти, дальше надо будет сохранять на диск, а еще дальше - будем работать с БД.
Все время ифчиками это не обложить.
Посмотри в сторону Dependency Injection и чистой архитектуры.
Вот ссылка для старта процесса изучения. Но это всего лишь старт, не окончательная версия.
Можно еще тут посмотреть, здесь показано как DI облегчит тестирование в дальнейшем.
Сейчас принимаю, но начинай задумываться над рефакторингом в сторону чистой архитектуры.
internal/logger/logger.go
Outdated
} | ||
|
||
// добавляем реализацию http.ResponseWriter | ||
loggingResponseWriter struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не увидел использования этой структуры
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
На предыдущих итерациях эти структурки были нужны, просто забил их выпилить. Спасибо за наблюдение
internal/logger/logger.go
Outdated
|
||
type ( | ||
// Структура для хранения сведений об ответе | ||
responseData struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так же не увидел использования этой структуры
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
здесь та же история, что и с предыдущей структурой)
спасибо
Remove storage import from file-manager, Change logic in main, Change code style in files, Remove server package, Fix tests
Separate filemanager layer from handlers, Improve filemanager handling in storage
No description provided.