Been learning Go for a couple months now, mostly tutorials, but wanted to
actually build something instead of just following along. So I made a
tiny CLI that checks the weather for any city.
Nothing fancy — takes a city name as a flag, hits a weather API, prints
the result. But it's the first thing I've built that actually works
end to end without me copy-pasting the whole thing from a tutorial.
Still cleaning it up (the error handling is genuinely embarrassing rn),
but repo's here if anyone wants to roast it or point out what I'm doing
wrong: https://github.com/ethxratt-create/weather-cli
Moved to Pune for college this year and still figuring out the whole
"actually shipping code" thing vs just watching tutorials. If anyone
has tips on what to build next as a beginner, I'm all ears.
Top comments (1)
Small update on the Go project I posted about a while back — got the
error handling actually working properly instead of just crashing
whenever the API call failed. Feels like a dumb thing to be proud of
but hey, progress.
Testing it out on random cities has been a nice way to kill time
between classes. Ran it on my own city first obviously, then just
started going through places I've actually been:
go run main.go --city="Pune"→ worksgo run main.go --city="Mumbai"→ worksgo run main.go --city="FC Road"→ doesn't work lol, turns outyou need an actual city name not a street, should've known that
Anyway repo's updated if anyone wants to see the error handling fix:
[link to weather-cli repo]
Still figuring out what to build next — thinking something with a
database this time instead of just API calls. Open to suggestions
from anyone who's been doing this longer than me.