Closed tehsphinx closed 5 years ago
Good idea! I never understood why people seem so reluctant to assign to the name
variable; if they come from pass-by-reference languages that might explain it.
All 3 points added to go-analyzer
repo (not uploaded yet: see https://github.com/exercism/automated-mentoring-support/issues/17).
TODO: Need to switch exalysis over use the suggestion algorithm from go-analyzer
once everything is integrated there.
exalysis
now uses the same suggestion algorithm as go-analyzer
for two-fer
There are 2 things I am thinking of adding:
twofer
is not necessary in Go as Go does not pass by reference. A hint on that and an explanation might be useful if people add a new variable instead of overwritingname
if it is empty.len(name) != 0
comparison. A string in Go should be checked withname == ""
for emptiness since a string in Go cannot benil
-- or anything else.https://github.com/exercism/automated-mentoring-support/issues/4