Skip to content

first#1

Open
mirzhil wants to merge 1 commit intomainfrom
first_branch
Open

first#1
mirzhil wants to merge 1 commit intomainfrom
first_branch

Conversation

@mirzhil
Copy link
Owner

@mirzhil mirzhil commented May 26, 2025

No description provided.

Copy link

@ivannizh ivannizh left a comment

Choose a reason for hiding this comment

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

Владимир, привет!

Все сделано верно, поздравляю со сдачей работы и желаю успехов на курсе!


steps, err := strconv.Atoi(parts[0])
if err != nil || steps <= 0 {
return 0, 0, fmt.Errorf("invalid steps: %v", err)

Choose a reason for hiding this comment

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

При оборачивании нужно использовать %w (wrap), а просто при выводе в консоль %v

Suggested change
return 0, 0, fmt.Errorf("invalid steps: %v", err)
return 0, 0, fmt.Errorf("invalid steps: %w", err)

Choose a reason for hiding this comment

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

Нужно везде поправить

// TODO: реализовать функцию
steps, duration, err := parsePackage(data)
if err != nil || steps <= 0 {
log.Println("ошибка:", err.Error())

Choose a reason for hiding this comment

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

Можно просто

Suggested change
log.Println("ошибка:", err.Error())
log.Println("ошибка:", err)

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