if the typestring gives a field name of "?", drop it.

R=rsc
DELTA=11  (7 added, 0 deleted, 4 changed)
OCL=20988
CL=20988
This commit is contained in:
Rob Pike 2008-12-11 13:24:04 -08:00
parent ac09eb4f49
commit 546f269c3b
3 changed files with 11 additions and 4 deletions

View file

@ -47,7 +47,10 @@ func TypeFieldsToString(t HasFields, sep string) string {
var str string;
for i := 0; i < t.Len(); i++ {
str1, typ, tag, offset := t.Field(i);
str1 += " " + TypeToString(typ, false);
if str1 != "" {
str1 += " "
}
str1 += TypeToString(typ, false);
if tag != "" {
str1 += " " + DoubleQuote(tag);
}