Hey Gophers!
I'm Python developer (mainly web dev) but recently started playing with Golang and I love it! I decided to learn Go and the best way to do this for me is by creating something in it.
So, I reimplemented fixer.io API that has been written in Ruby by hakanensari. Could you review my code and give any tips or opinions please? I plan to improve it over time but that's the first version, which I think I can share with others.
Code at github: goexrates
评论:
icholy:
seblw:Return errors, don't panic.
UniverseCity:You shouldn't use float for currencies. https://www.noelherrick.com/blog/always-use-decimal-for-money
luqku:Use net/http status constants, rather than hardcoding 400/500/etc.
Thanks for feedback. Do you have any thoughts about project structure? I know, it's pretty simple API but I would like to know if there is any convention how to organize this kind of projects.
