summaryrefslogtreecommitdiff
path: root/usr/r/reflect/tostring.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-10-16 16:38:33 -0700
committerRob Pike <r@golang.org>2008-10-16 16:38:33 -0700
commit616269759182e5c6cab0c1329ddc5e38fbf644ed (patch)
tree123618861315bee8a868b6516ae19b955657b88e /usr/r/reflect/tostring.go
parent9f032217e78085cabbc4d065f3ab2a8a8c74cee7 (diff)
downloadgolang-616269759182e5c6cab0c1329ddc5e38fbf644ed.tar.gz
parsing of type strings. still missing: func, struct, interface, chan
R=rsc DELTA=366 (337 added, 7 deleted, 22 changed) OCL=17321 CL=17324
Diffstat (limited to 'usr/r/reflect/tostring.go')
-rw-r--r--usr/r/reflect/tostring.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/r/reflect/tostring.go b/usr/r/reflect/tostring.go
index b3cd8568e..60fb9f6f8 100644
--- a/usr/r/reflect/tostring.go
+++ b/usr/r/reflect/tostring.go
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Reflection library.
+// Formatting of types for debugging.
+
package reflect
import (
@@ -28,6 +31,8 @@ func FieldsToString(t Type) string {
func ToString(typ Type) string {
var str string;
switch(typ.Kind()) {
+ case MissingKind:
+ return "missing";
case Int8Kind:
return "int8";
case Int16Kind: