summaryrefslogtreecommitdiff
path: root/src/cmd/api/goapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/api/goapi.go')
-rw-r--r--src/cmd/api/goapi.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go
index 6d39a463f6..1ee852ea79 100644
--- a/src/cmd/api/goapi.go
+++ b/src/cmd/api/goapi.go
@@ -879,7 +879,7 @@ func (w *Walker) walkTypeSpec(ts *ast.TypeSpec) {
case *ast.InterfaceType:
w.walkInterfaceType(name, t)
default:
- w.emitFeature(fmt.Sprintf("type %s %s", name, w.nodeString(ts.Type)))
+ w.emitFeature(fmt.Sprintf("type %s %s", name, w.nodeString(w.namelessType(ts.Type))))
}
}
@@ -1120,7 +1120,13 @@ func (w *Walker) namelessFieldList(fl *ast.FieldList) *ast.FieldList {
fl2 := &ast.FieldList{}
if fl != nil {
for _, f := range fl.List {
- fl2.List = append(fl2.List, w.namelessField(f))
+ repeats := 1
+ if len(f.Names) > 1 {
+ repeats = len(f.Names)
+ }
+ for i := 0; i < repeats; i++ {
+ fl2.List = append(fl2.List, w.namelessField(f))
+ }
}
}
return fl2