You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been slowly working on migrating more of Heroku’s codebase over to Go. One of
my more Ruby-centric coworkers just wasted several hours today on Go’s lack of support
for this regular expression:
var validRequest = regexp.MustCompile(`^/customer/(\w+)/(\w+)?authas=\1(&.*)?`)
After tweaking, I’ve narrowed it down to this minimal repro case:
var r = regexp.MustCompile(`^(a).+\1`)
That works fine in Ruby:
$ irb
>> "abba".match(/^(a).+\1/)
=> #<MatchData "abba" 1:"a">
Why doesn’t this work in Go?
Not to look a gift horse in the mouth, but I’ll have a harder time getting co-workers
to adopt Go if such basic things from Ruby aren’t even supported.
The text was updated successfully, but these errors were encountered:
I promised Blaked to update this bug, for the record, that he is not an idiot, and will
not be banned from the Go community.
Thanks for playing along, Blake!
by blake.mizerany:
The text was updated successfully, but these errors were encountered: