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

Return all Errors #2

Open
mubaris opened this issue Jan 15, 2018 · 4 comments
Open

Return all Errors #2

mubaris opened this issue Jan 15, 2018 · 4 comments

Comments

@mubaris
Copy link
Member

mubaris commented Jan 15, 2018

Right now, the errors are just printing to the console. Instead, we want them to return. Don't forget to add return type

@anandwana001
Copy link

could you please explain a bit!?

@mubaris
Copy link
Member Author

mubaris commented Jan 15, 2018

See this code snippet,

priceUsd := coindesk.GetPrice()

We want like this

priceUsd, err := coindesk.GetPrice()

This will give error handling to the user. Right now error handling is being done inside the functions. Instead of printing them, we need to return it.

@pani-vishal
Copy link

Can I take this?

@gauthamzz
Copy link
Member

yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants