Hey guys! I'm trying to build a bot for Reddit written in Go so I can learn a new language, etc etc.
However some questions arose:
-Best way to separate files, implementations, functions and so on. I have a Java background, as you know in Java, one class, one file and so on, however in Go it doesn't work like it.
-How can I query an API and process the JSON response? Example
-Is it viable to create a go file with just constants? Like an Enumeration?
Thank you guys!
评论:
cixtor:
chalcidfly:I started writing a Reddit API Client in Go sometime ago [1].
It's not the best code in the world but you can get some ideas from it.
https://github.com/turnage/graw should have some helpful resources
