Skip to content

1st commit#1

Open
Yuriy354 wants to merge 2 commits intomainfrom
vetka
Open

1st commit#1
Yuriy354 wants to merge 2 commits intomainfrom
vetka

Conversation

@Yuriy354
Copy link
Owner

ВОт сейчас точно заработает

@Yuriy354
Copy link
Owner Author

Вроде сделал все правильно.

Copy link

@dirtymew dirtymew left a comment

Choose a reason for hiding this comment

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

Юрий

есть еще что исправить

на будущее - лучше чтобы весь процесс ревью был в одном PR

main.go Outdated
func (r Running) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return InfoMessage{

Choose a reason for hiding this comment

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

теперь тут неверно

см задание

Для реализации этого метода для структуры Running{} нужно вернуть вызов такого же метода TrainingInfo(), только для структуры Training{}. Вспомните, как вызывать методы встроенной структуры.

main.go Outdated
func (w Walking) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return InfoMessage{

Choose a reason for hiding this comment

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

тоже замечание что и для Running

main.go Outdated
// вставьте ваш код ниже
...
var meanSpeedInMInSec float64 = math.Pow(w.meanSpeed()*KmHInMsec, 2)
return (CaloriesWeightMultiplier*w.Weight + (meanSpeedInMInSec/(w.Height/CmInM))*CaloriesSpeedHeightMultiplier*w.Weight) * w.Duration.Hours() * MinInHours

Choose a reason for hiding this comment

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

тут возможно деление на 0

main.go Outdated
// вставьте ваш код ниже
...

return InfoMessage{

Choose a reason for hiding this comment

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

тут все ок

Copy link

@dirtymew dirtymew left a comment

Choose a reason for hiding this comment

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

Юрий

работу принимаю

но есть замечания по исправлениям - обрати внимание

func (s Swimming) TrainingInfo() InfoMessage {
// вставьте ваш код ниже
...
return s.Training.TrainingInfo()

Choose a reason for hiding this comment

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

тут было верно - зачем исправил ?

return InfoMessage{
		TrainingType: s.TrainingType,
		Duration:     s.Duration,
		Distance:     s.distance(),
		Speed:        s.meanSpeed(),
		Calories:     s.Calories(),
	}

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