Skip to content
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

iter20 #19

Closed
wants to merge 3 commits into from
Closed

iter20 #19

wants to merge 3 commits into from

Conversation

alexlzrv
Copy link
Owner

No description provided.

@alexlzrv alexlzrv requested a review from s-shpak August 25, 2023 14:43
@alexlzrv alexlzrv changed the title added multichecker and greetings iter20 Aug 25, 2023
Copy link

@s-shpak s-shpak left a comment

Choose a reason for hiding this comment

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

Текущее покрытие тестами: 42.9%, по заданию оно должно быть >= 55%

greetings.BuildCommit = "N/A"
}

tmpl := template.Must(template.New("greetings").Parse(greetingsTemplate))
Copy link

Choose a reason for hiding this comment

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

Функции и методы с перфиксом Must используются, как правило, для объявления переменных на уровне пакета. Если ты вызываешь такую функцию внутри другой функции, то имеет смысл проверить ошибку, которую она может вернуть

Copy link
Owner Author

Choose a reason for hiding this comment

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

функция Must не возвращает ошибку, но при вызове tmpl.Execute(os.Stdout, greetings) ошибка и будет возвращаться тут

continue
}

if code.IsMain(pass) {
Copy link

Choose a reason for hiding this comment

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

Пожалуйста, перепиши код так, чтобы он не вызывал внешний пакет, а использовал только https://pkg.go.dev/go/ast

@alexlzrv alexlzrv closed this Oct 11, 2023
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