nickva commented on a change in pull request #1126: Hide credential information
in replication document for reader
URL: https://github.com/apache/couchdb/pull/1126#discussion_r163875958
##########
File path: src/couch_replicator/src/couch_replicator_docs.erl
##########
@@ -695,7 +695,8 @@ strip_credentials(Url) when is_binary(Url) ->
"http\\1://\\2",
[{return, binary}]);
strip_credentials({Props}) ->
- {lists:keydelete(<<"oauth">>, 1, Props)}.
+ Props0 = lists:keydelete(<<"oauth">>, 1, Props),
Review comment:
Minor nit on variable names -- `Props1` might work a bit better here.
Usually when adding new code towards the middle or the bottom of the
function, start adding 1,2,3 like so `Props, Props1=newoperation(Props)..,
...use Props1 from now on...`. If there is a large function that uses `Props`
in the body and we need to do modify it at the beginning of the function, then
it's better to do ```function(Prop0 =...) -> Props = newoperation(Props0),
....```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services