Drop volatile facts after a yield statement

This commit is contained in:
Nigel Tao committed 2017-12-01 16:24:54 +11:00
1 parent 849db0faa2
commit 906bca4e39
4 files changed
+19 -4

No files matched your search

+3
View File
@@ -58,6 +58,9 @@ func init() {
}
}
// TODO: a collection of forbidden variable names like and, or, not, as, ref,
// deref, false, true, in, out, this, u8, u16, etc?
func TrimQuotes(s string) string {
if len(s) >= 2 && s[0] == '"' && s[len(s)-1] == '"' {
return s[1 : len(s)-1]