-
Notifications
You must be signed in to change notification settings - Fork 0
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
Full Review #5
base: umang-review
Are you sure you want to change the base?
Full Review #5
Conversation
Get weather for Lat Lon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great! I just made a few suggestions for tweaking the names of functions at a couple of points.
(Comments from me and @vanjara)
@@ -0,0 +1,56 @@ | |||
![Go](https://github.com/qba73/meteo/workflows/Go/badge.svg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These badges look nice!
|
||
# meteo | ||
|
||
Meteo is a Go client library for the weather and meteorological forecast from [Yr](https://www.yr.no/en). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great README! Maybe move the example up to the top, so it's the first thing users see?
} | ||
c, err := NewNorwayClient(resolver) | ||
if err != nil { | ||
fmt.Fprintln(os.Stderr, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printing to standard error makes sense!
|
||
func TestCreateNewMeteoClient(t *testing.T) { | ||
t.Parallel() | ||
var c *meteo.NorwayClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a neat way to show the reader what NewNorwayClient
returns.
t.Parallel() | ||
mux := http.NewServeMux() | ||
|
||
mux.HandleFunc("/weatherapi/locationforecast/2.0/compact", func(rw http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this is testing a lot in one test!
A simpler test fixture might be easier to understand and there's less danger of bugs in the fixture.
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
A full review of the entire repository. When this PR is complete, be sure to manually merge its head branch into the main branch for this repository.