aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-07-31 14:09:19 +1000
committerRob Pike <r@golang.org>2013-07-31 14:09:19 +1000
commit609d742e791eebceddaeae419b3b909594f4e404 (patch)
tree0303b2db5b6995c742e9e1da8ec28b6bbd5704bf /src/pkg
parent02ad82fe153ee64cde7823a4ca2fb594624bb82e (diff)
downloadgo-609d742e791eebceddaeae419b3b909594f4e404.tar.xz
fmt: remove "Scan:" prefix from error messages
The prefix was not uniformly applied and is probably better left off anyway. Fixes #4944. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12140043
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/fmt/scan.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/fmt/scan.go b/src/pkg/fmt/scan.go
index c7e648579a..f223897a91 100644
--- a/src/pkg/fmt/scan.go
+++ b/src/pkg/fmt/scan.go
@@ -885,7 +885,7 @@ func (s *ss) hexDigit(d rune) int {
case 'A', 'B', 'C', 'D', 'E', 'F':
return 10 + digit - 'A'
}
- s.errorString("Scan: illegal hex digit")
+ s.errorString("illegal hex digit")
return 0
}
@@ -915,7 +915,7 @@ func (s *ss) hexString() string {
s.buf.WriteByte(b)
}
if len(s.buf) == 0 {
- s.errorString("Scan: no hex data for %x string")
+ s.errorString("no hex data for %x string")
return ""
}
return string(s.buf)
@@ -994,7 +994,7 @@ func (s *ss) scanOne(verb rune, arg interface{}) {
val := reflect.ValueOf(v)
ptr := val
if ptr.Kind() != reflect.Ptr {
- s.errorString("Scan: type not a pointer: " + val.Type().String())
+ s.errorString("type not a pointer: " + val.Type().String())
return
}
switch v := ptr.Elem(); v.Kind() {
@@ -1010,7 +1010,7 @@ func (s *ss) scanOne(verb rune, arg interface{}) {
// For now, can only handle (renamed) []byte.
typ := v.Type()
if typ.Elem().Kind() != reflect.Uint8 {
- s.errorString("Scan: can't handle type: " + val.Type().String())
+ s.errorString("can't scan type: " + val.Type().String())
}
str := s.convertString(verb)
v.Set(reflect.MakeSlice(typ, len(str), len(str)))
@@ -1024,7 +1024,7 @@ func (s *ss) scanOne(verb rune, arg interface{}) {
case reflect.Complex64, reflect.Complex128:
v.SetComplex(s.scanComplex(verb, v.Type().Bits()))
default:
- s.errorString("Scan: can't handle type: " + val.Type().String())
+ s.errorString("can't scan type: " + val.Type().String())
}
}
}
@@ -1057,7 +1057,7 @@ func (s *ss) doScan(a []interface{}) (numProcessed int, err error) {
break
}
if !isSpace(r) {
- s.errorString("Scan: expected newline")
+ s.errorString("expected newline")
break
}
}