change default extension of configuration file to json#92
change default extension of configuration file to json#92kytrinyx merged 11 commits intoexercism:masterfrom
Conversation
|
The Travis build failure appears to be an issue with |
|
D'oh. I added that this morning, and then we had a critical issue at work and I haven't had a chance to check it. Let me remove that for now. I need to look at this tomorrow morning—so fried right now. Thanks for working on this! |
config/config.go
Outdated
There was a problem hiding this comment.
Per the golang style guide, all exported functions should be commented (see the style of the other exported comments in this package). For now I've only been trying to clean up the config package–main has larger issues than style at the moment.
|
This looks good overall. I'm slowly trying to refactor my way to a cleaner design in this thing, so all the style comments are mostly just a conversation starter about where I want to go eventually. I've been running $ golint config/*goIt might sometimes complain about things that aren't really problems, but for the most part it really helps clean up some basic go idiom things. |
config/config.go
Outdated
There was a problem hiding this comment.
If this is used outside the package, then I would name it Normalize() (because then it would be called with config.NormalizeConfig() and there's a stutter). Here, since it's only used inside the package I wouldn't export it, and I would name it normalizeFilename.
|
Thanks for taking the time to put this feedback together. I've implemented most of your suggestions. BTW should I be rebasing or merging cli/master in to this feature branch ? |
|
Yeah, go ahead and rebase this onto master. This looks good. I can change the bit around messaging the user after it's merged in to master. |
|
Sorry, silly question, but do you mean for me to call |
|
Yeah, there are a few ways you could do this:
# assuming you are on json-extension
git pull --rebase upstream master
# assuming you are on json-extension
git fetch upstream && git rebase upstream/master
git checkout master
git pull upstream master # assuming you have not changed your master
git checkout json-extension
git rebase master |
|
Thanks for the explanation, I definitely learned something from that. After performing this I'm getting branches diverged status. I can easily undo this operation (thanks reflog!). I can pull, but then I get a merge commit. |
|
Branches diverged is normal in this scenario (sorry, I should have mentioned that), and the fix is to push with git push --force origin json-extensionThat will put whatever is on your local branch up on the remote branch, and it automatically updates the pull request. |
|
I should probably mention that pushing with |
This allows us to determine if the user has supplied a configuration path or not. The cli package fills in a default value so we would not know whether the returned path is coming from the cli package defaults or the user.
No error means the file is present. An error other than a file missing should be returned. I'm not sure if there's a simpler way to accomplish this but my head !Nothurts(isHurtError).
|
Excellent! Thanks for your help! I did a push --force, so unless you see something else, I don't think there's any more to do on this pull request. |
|
This looks great, thank you! |
change default extension of configuration file to json
-coption to the cliI'm new to go and contributing because I want practice and want to learn. Feedback is welcome.
This should resolve issue #39