Skip to content
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

Wl/config url #181

Merged
merged 13 commits into from
Jul 31, 2019
Merged

Wl/config url #181

merged 13 commits into from
Jul 31, 2019

Conversation

willfairwinds
Copy link
Contributor

Expanded ParseFile to include URL's and added a test for it.

@codecov
Copy link

codecov bot commented Jul 25, 2019

Codecov Report

Merging #181 into master will increase coverage by 0.89%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
+ Coverage   84.12%   85.01%   +0.89%     
==========================================
  Files           9        9              
  Lines         529      534       +5     
==========================================
+ Hits          445      454       +9     
+ Misses         65       58       -7     
- Partials       19       22       +3
Impacted Files Coverage Δ
pkg/config/config.go 72% <83.33%> (+27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20bd32a...fae7a9f. Read the comment docs.

@rbren
Copy link
Contributor

rbren commented Jul 25, 2019

Looks great! Just one change re: error handling and I think this is good to merge.

Bonus: you can try adding another test that doesn't start an HTTP server (so that the HTTP request fails), and check to make sure you get the right error message. That would catch the current bug.

}
if err != nil {
return Configuration{}, err
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This still has to go outside the else statement, or the err on line 131 won't get caught

if path == "" {
rawBytes, err = configBox.Find("config.yaml")
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Once you move the if err != nil below, this check can go away, since it'll be handled outside the if/else.

@rbren
Copy link
Contributor

rbren commented Jul 29, 2019

Looking good! Just one more small change

Copy link
Contributor

@rbren rbren left a comment

Choose a reason for hiding this comment

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

Thanks Will!

@willfairwinds willfairwinds merged commit dce24a0 into master Jul 31, 2019
@willfairwinds willfairwinds deleted the wl/config-URL branch July 31, 2019 19:19
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