Skip to content

Full Review - #5

Open
bitfield wants to merge 33 commits into
umang-reviewfrom
umang-full-content
Open

Full Review#5
bitfield wants to merge 33 commits into
umang-reviewfrom
umang-full-content

Conversation

@bitfield

Copy link
Copy Markdown
Collaborator

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.

@bitfield bitfield left a comment

Copy link
Copy Markdown
Collaborator Author

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)

Comment thread README.md
@@ -0,0 +1,56 @@
![Go](https://github.com/qba73/meteo/workflows/Go/badge.svg)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These badges look nice!

Comment thread README.md

# meteo

Meteo is a Go client library for the weather and meteorological forecast from [Yr](https://www.yr.no/en).

Copy link
Copy Markdown
Collaborator Author

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?

Comment thread meteo.go Outdated
Comment thread meteo.go
Comment thread meteo.go
}
c, err := NewNorwayClient(resolver)
if err != nil {
fmt.Fprintln(os.Stderr, err)

Copy link
Copy Markdown
Collaborator Author

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!

Comment thread meteo.go Outdated
Comment thread norway_test.go Outdated
Comment thread norway_test.go

func TestCreateNewMeteoClient(t *testing.T) {
t.Parallel()
var c *meteo.NorwayClient

Copy link
Copy Markdown
Collaborator Author

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.

Comment thread norway_test.go
Comment thread norway_test.go
t.Parallel()
mux := http.NewServeMux()

mux.HandleFunc("/weatherapi/locationforecast/2.0/compact", func(rw http.ResponseWriter, r *http.Request) {

Copy link
Copy Markdown
Collaborator Author

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.

qba73 and others added 4 commits November 11, 2021 04:35
Co-authored-by: John Arundel <john@bitfieldconsulting.com>
Co-authored-by: John Arundel <john@bitfieldconsulting.com>
Co-authored-by: John Arundel <john@bitfieldconsulting.com>
Co-authored-by: John Arundel <john@bitfieldconsulting.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants