-
Notifications
You must be signed in to change notification settings - Fork 0
HW2 is completed #2
base: master
Are you sure you want to change the base?
Conversation
agneum
left a comment
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.
Спасибо за выполненное задание.
Хорошая работа, однако возвращаю решение на доработку, поскольку не хватает новых юнит-тестов
Итого: 5 баллов из 10
| @@ -1,12 +1,59 @@ | |||
| package hw02unpackstring | |||
| package main | |||
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.
После такого переименования пакет станет недоступным для импорта.
Если идея была проверить работоспособность функции, то для этого лучше использовать тесты
| return "", nil | ||
| func isValidStr(runesArray []rune) bool { | ||
| var previousIsDigit bool | ||
| for key, char := range runesArray { |
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.
Предлагаю проверки перенести в один общий цикл, чтобы не перебирать строку дважды
| for key, char := range runesArray { | ||
| currentSymbol := string(char) | ||
| if unicode.IsDigit(char) && buf != "" && buf != "\\" { | ||
| countRepeat, _ := strconv.Atoi(currentSymbol) |
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.
Ошибки важно обрабатывать
| @@ -1,4 +1,4 @@ | |||
| package hw02unpackstring | |||
| package main | |||
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.
Не хватает новых юнит-тестов
Домашнее задание №2 «Распаковка строки»
Чек-лист студента (Что это?)
go mod tidy..syncфайл. Зачем его удалять?Критерии оценки
Зачёт от 7 баллов