aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/mime/grammar.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/mime/grammar.go')
-rw-r--r--libgo/go/mime/grammar.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/libgo/go/mime/grammar.go b/libgo/go/mime/grammar.go
index 70a94cd..e16a06c 100644
--- a/libgo/go/mime/grammar.go
+++ b/libgo/go/mime/grammar.go
@@ -10,16 +10,16 @@ import (
// isTSpecial returns true if rune is in 'tspecials' as defined by RFC
// 1521 and RFC 2045.
-func isTSpecial(rune int) bool {
- return strings.IndexRune(`()<>@,;:\"/[]?=`, rune) != -1
+func isTSpecial(r rune) bool {
+ return strings.IndexRune(`()<>@,;:\"/[]?=`, r) != -1
}
// IsTokenChar returns true if rune is in 'token' as defined by RFC
// 1521 and RFC 2045.
-func IsTokenChar(rune int) bool {
+func IsTokenChar(r rune) bool {
// token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
// or tspecials>
- return rune > 0x20 && rune < 0x7f && !isTSpecial(rune)
+ return r > 0x20 && r < 0x7f && !isTSpecial(r)
}
// IsToken returns true if s is a 'token' as as defined by RFC 1521
@@ -32,14 +32,14 @@ func IsToken(s string) bool {
}
// IsQText returns true if rune is in 'qtext' as defined by RFC 822.
-func IsQText(rune int) bool {
+func IsQText(r int) bool {
// CHAR = <any ASCII character> ; ( 0-177, 0.-127.)
// qtext = <any CHAR excepting <">, ; => may be folded
// "\" & CR, and including
// linear-white-space>
- switch rune {
+ switch r {
case '"', '\\', '\r':
return false
}
- return rune < 0x80
+ return r < 0x80
}