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
On Go 1.7, this passes with s1==s2=="test"
On tip, this fails with s1=="\x80test\xff" and s2=="test"
The string passed into the cutset is an invalid UTF-8 string, but I have actually seen a few instances of this in production code (filed a lint check for this: golang/lint#252). Regardless, the behavior of this edge case should be preserved from Go 1.7 to Go 1.8.
8737dac caused a regression where the functionality of Trim changed with an invalid cutset.
Consider the following test:
On Go 1.7, this passes with
s1==s2=="test"
On tip, this fails with
s1=="\x80test\xff"
ands2=="test"
The string passed into the cutset is an invalid UTF-8 string, but I have actually seen a few instances of this in production code (filed a lint check for this: golang/lint#252). Regardless, the behavior of this edge case should be preserved from Go 1.7 to Go 1.8.
\cc @bradfitz @hirochachacha
The text was updated successfully, but these errors were encountered: