-
Notifications
You must be signed in to change notification settings - Fork 54
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
images: Add support to override the image to use per language #47
images: Add support to override the image to use per language #47
Conversation
Codecov Report
@@ Coverage Diff @@
## master #47 +/- ##
==========================================
+ Coverage 59.75% 59.91% +0.16%
==========================================
Files 15 15
Lines 738 741 +3
==========================================
+ Hits 441 444 +3
Misses 256 256
Partials 41 41
Continue to review full report at Codecov.
|
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 will be great for debugging, thanks.
cmd/bblfsh/server.go
Outdated
"os" | ||
"strings" | ||
|
||
errors "srcd.works/go-errors.v0" |
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.
No need to alias this. The defined package is errors
even if the last part of the import path is not.
image := strings.TrimSpace(fields[1]) | ||
logrus.Debugf("Overriding image for %s: %s", lang, image) | ||
overrides[lang] = image | ||
} |
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.
We usually put a blank line after every for/if block.
* Do not alias an import * Add a blank line after a for loop
Fixes #43
I used a slightly different environment variable name which I think may be better.
I also preferred to handle the environment in the same place where CLI inputs are handled, and pass this information to the server explicitely.