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

Dongle dunkey #8

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Dongle dunkey #8

wants to merge 14 commits into from

Conversation

Mycron
Copy link

@Mycron Mycron commented Oct 19, 2022

No description provided.

type ErrNegativeSqrt float64

func (e ErrNegativeSqrt) Error() string {
return fmt.Sprintln("cannot Sqrt negative number: -2")
Copy link
Owner

Choose a reason for hiding this comment

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

There must be no new line in such functions, only one line string. Also the actual number must be returned instead of hardcoded value.
fmt.Sprintf is the best option here

Copy link
Author

Choose a reason for hiding this comment

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

Correct it on 1ecacf5
As a part of this exercise, I found myself with the cast :)

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