Skip to content

first - #1

Open
EkzeKutor95 wants to merge 1 commit into
masterfrom
first
Open

EkzeKutor95 wants to merge 1 commit into
masterfrom
first

Conversation

@EkzeKutor95

Copy link
Copy Markdown
Owner

No description provided.

@ivannizh ivannizh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет!
Хороший код, все работает по ТЗ, принято!

Есть одно небольшое замечание, исправь, пожалуйста сам, не буду из-за него возвращать работу.

Comment thread main.go
// настройте подключение к БД
db, err := sql.Open("sqlite", "tracker.db")
if err != nil {
fmt.Println(err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

После вывода ошибки нужно выйти из функции, а иначе код дальше продолжит работу

Comment thread parcel_test.go
storedParcel, err := store.Get(id)
require.NoError(t, err)

require.Equal(t, parcel.Client, storedParcel.Client)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Функция Equal может сравнивать структуры сразу (а не по полям), надо только с полем Number разобраться.

Нужно переделать, так как при таком подходе при изменении структуры нужно будет менять все тесты

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants