aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/parse.go')
-rw-r--r--libgo/go/net/parse.go33
1 files changed, 10 insertions, 23 deletions
diff --git a/libgo/go/net/parse.go b/libgo/go/net/parse.go
index 6c230ab..ee2890f 100644
--- a/libgo/go/net/parse.go
+++ b/libgo/go/net/parse.go
@@ -208,6 +208,16 @@ func last(s string, b byte) int {
return i
}
+// hasUpperCase tells whether the given string contains at least one upper-case.
+func hasUpperCase(s string) bool {
+ for i := range s {
+ if 'A' <= s[i] && s[i] <= 'Z' {
+ return true
+ }
+ }
+ return false
+}
+
// lowerASCIIBytes makes x ASCII lowercase in-place.
func lowerASCIIBytes(x []byte) {
for i, b := range x {
@@ -331,26 +341,3 @@ func readFull(r io.Reader) (all []byte, err error) {
}
}
}
-
-// goDebugString returns the value of the named GODEBUG key.
-// GODEBUG is of the form "key=val,key2=val2"
-func goDebugString(key string) string {
- s := os.Getenv("GODEBUG")
- for i := 0; i < len(s)-len(key)-1; i++ {
- if i > 0 && s[i-1] != ',' {
- continue
- }
- afterKey := s[i+len(key):]
- if afterKey[0] != '=' || s[i:i+len(key)] != key {
- continue
- }
- val := afterKey[1:]
- for i, b := range val {
- if b == ',' {
- return val[:i]
- }
- }
- return val
- }
- return ""
-}