diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-04-28 10:35:15 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-04-28 10:35:15 +0200 |
| commit | c1ba1a0fec4aed430709030f98a3bdb90bfeea16 (patch) | |
| tree | 3df18657e50a0313ed6defcda30e4474cb28a467 /src/pkg/fmt/scan.go | |
| parent | 7b15ed9ef455b6b66c6b376898a88aef5d6a9970 (diff) | |
| download | golang-c1ba1a0fec4aed430709030f98a3bdb90bfeea16.tar.gz | |
Imported Upstream version 2011.04.27upstream/2011.04.27
Diffstat (limited to 'src/pkg/fmt/scan.go')
| -rw-r--r-- | src/pkg/fmt/scan.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/fmt/scan.go b/src/pkg/fmt/scan.go index b1b3975e2..42bc52c92 100644 --- a/src/pkg/fmt/scan.go +++ b/src/pkg/fmt/scan.go @@ -423,7 +423,7 @@ func (s *ss) token(skipSpace bool, f func(int) bool) []byte { // typeError indicates that the type of the operand did not match the format func (s *ss) typeError(field interface{}, expected string) { - s.errorString("expected field of type pointer to " + expected + "; found " + reflect.Typeof(field).String()) + s.errorString("expected field of type pointer to " + expected + "; found " + reflect.TypeOf(field).String()) } var complexError = os.ErrorString("syntax error scanning complex number") @@ -908,7 +908,7 @@ func (s *ss) scanOne(verb int, field interface{}) { // If we scanned to bytes, the slice would point at the buffer. *v = []byte(s.convertString(verb)) default: - val := reflect.NewValue(v) + val := reflect.ValueOf(v) ptr := val if ptr.Kind() != reflect.Ptr { s.errorString("Scan: type not a pointer: " + val.Type().String()) |
