@@ -35,7 +35,7 @@ type Package struct {
35
35
36
36
// Print writes the package name and its exported interfaces.
37
37
func (pkg * Package ) Print (w io.Writer ) {
38
- fmt .Fprintf (w , "package %s\n " , pkg .Name )
38
+ _ , _ = fmt .Fprintf (w , "package %s\n " , pkg .Name )
39
39
for _ , intf := range pkg .Interfaces {
40
40
intf .Print (w )
41
41
}
@@ -58,7 +58,7 @@ type Interface struct {
58
58
59
59
// Print writes the interface name and its methods.
60
60
func (intf * Interface ) Print (w io.Writer ) {
61
- fmt .Fprintf (w , "interface %s\n " , intf .Name )
61
+ _ , _ = fmt .Fprintf (w , "interface %s\n " , intf .Name )
62
62
for _ , m := range intf .Methods {
63
63
m .Print (w )
64
64
}
@@ -79,19 +79,19 @@ type Method struct {
79
79
80
80
// Print writes the method name and its signature.
81
81
func (m * Method ) Print (w io.Writer ) {
82
- fmt .Fprintf (w , " - method %s\n " , m .Name )
82
+ _ , _ = fmt .Fprintf (w , " - method %s\n " , m .Name )
83
83
if len (m .In ) > 0 {
84
- fmt .Fprintf (w , " in:\n " )
84
+ _ , _ = fmt .Fprintf (w , " in:\n " )
85
85
for _ , p := range m .In {
86
86
p .Print (w )
87
87
}
88
88
}
89
89
if m .Variadic != nil {
90
- fmt .Fprintf (w , " ...:\n " )
90
+ _ , _ = fmt .Fprintf (w , " ...:\n " )
91
91
m .Variadic .Print (w )
92
92
}
93
93
if len (m .Out ) > 0 {
94
- fmt .Fprintf (w , " out:\n " )
94
+ _ , _ = fmt .Fprintf (w , " out:\n " )
95
95
for _ , p := range m .Out {
96
96
p .Print (w )
97
97
}
@@ -122,7 +122,7 @@ func (p *Parameter) Print(w io.Writer) {
122
122
if n == "" {
123
123
n = `""`
124
124
}
125
- fmt .Fprintf (w , " - %v: %v\n " , n , p .Type .String (nil , "" ))
125
+ _ , _ = fmt .Fprintf (w , " - %v: %v\n " , n , p .Type .String (nil , "" ))
126
126
}
127
127
128
128
// Type is a Go type.
@@ -264,6 +264,7 @@ func (nt *NamedType) String(pm map[string]string, pkgOverride string) string {
264
264
265
265
return nt .Type
266
266
}
267
+
267
268
func (nt * NamedType ) addImports (im map [string ]bool ) {
268
269
if nt .Package != "" {
269
270
im [nt .Package ] = true
@@ -283,8 +284,8 @@ func (pt *PointerType) addImports(im map[string]bool) { pt.Type.addImports(im) }
283
284
// PredeclaredType is a predeclared type such as "int".
284
285
type PredeclaredType string
285
286
286
- func (pt PredeclaredType ) String (pm map [string ]string , pkgOverride string ) string { return string (pt ) }
287
- func (pt PredeclaredType ) addImports (im map [string ]bool ) {}
287
+ func (pt PredeclaredType ) String (map [string ]string , string ) string { return string (pt ) }
288
+ func (pt PredeclaredType ) addImports (map [string ]bool ) {}
288
289
289
290
// The following code is intended to be called by the program generated by ../reflect.go.
290
291
0 commit comments