mirror of
https://github.com/golang/go
synced 2024-11-18 08:44:43 -07:00
cmd/guru: change "Method set:" to less formal "Methods:"
Change-Id: I7a43f3e9ed7e88f4f8f09d4d112c81aa037b7d8d Reviewed-on: https://go-review.googlesource.com/21111 Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
c6be41b91f
commit
35cacb533e
@ -25,7 +25,7 @@ import (
|
||||
// including:
|
||||
// - its syntactic category
|
||||
// - the definition of its referent (for identifiers) [now redundant]
|
||||
// - its type and method set (for an expression or type expression)
|
||||
// - its type, fields, and methods (for an expression or type expression)
|
||||
//
|
||||
func describe(q *Query) error {
|
||||
lconf := loader.Config{Build: q.Build}
|
||||
@ -479,7 +479,7 @@ type describeField struct {
|
||||
|
||||
func printMethods(printf printfFunc, node ast.Node, methods []*types.Selection) {
|
||||
if len(methods) > 0 {
|
||||
printf(node, "Method set:")
|
||||
printf(node, "Methods:")
|
||||
}
|
||||
for _, meth := range methods {
|
||||
// Print the method type relative to the package
|
||||
|
16
cmd/guru/testdata/src/describe/main.golden
vendored
16
cmd/guru/testdata/src/describe/main.golden
vendored
@ -64,7 +64,7 @@ defined here
|
||||
-------- @describe type-D --------
|
||||
reference to type D (size 24, align 8)
|
||||
defined as struct{Field int; AnotherField string}
|
||||
Method set:
|
||||
Methods:
|
||||
method (D) f()
|
||||
Fields:
|
||||
Field int
|
||||
@ -73,7 +73,7 @@ Fields:
|
||||
-------- @describe type-I --------
|
||||
reference to type I (size 16, align 8)
|
||||
defined as interface{f()}
|
||||
Method set:
|
||||
Methods:
|
||||
method (I) f()
|
||||
|
||||
-------- @describe func-ref-d.f --------
|
||||
@ -86,7 +86,7 @@ defined here
|
||||
|
||||
-------- @describe ptr-with-nonptr-methods --------
|
||||
definition of var dptr *D
|
||||
Method set:
|
||||
Methods:
|
||||
method (*D) f()
|
||||
Fields:
|
||||
Field int
|
||||
@ -95,7 +95,7 @@ Fields:
|
||||
-------- @describe ref-lexical-d --------
|
||||
reference to var d D
|
||||
defined here
|
||||
Method set:
|
||||
Methods:
|
||||
method (D) f()
|
||||
Fields:
|
||||
Field int
|
||||
@ -127,19 +127,19 @@ defined here
|
||||
-------- @describe var-ref-i-C --------
|
||||
reference to var i I
|
||||
defined here
|
||||
Method set:
|
||||
Methods:
|
||||
method (I) f()
|
||||
|
||||
-------- @describe var-ref-i-D --------
|
||||
reference to var i I
|
||||
defined here
|
||||
Method set:
|
||||
Methods:
|
||||
method (I) f()
|
||||
|
||||
-------- @describe var-ref-i --------
|
||||
reference to var i I
|
||||
defined here
|
||||
Method set:
|
||||
Methods:
|
||||
method (I) f()
|
||||
|
||||
-------- @describe const-local-pi --------
|
||||
@ -210,7 +210,7 @@ function call (or conversion) of type invalid type
|
||||
|
||||
-------- @describe def-iface-I --------
|
||||
definition of type I (size 16, align 8)
|
||||
Method set:
|
||||
Methods:
|
||||
method (I) f()
|
||||
|
||||
-------- @describe def-imethod-I.f --------
|
||||
|
2
cmd/guru/testdata/src/imports/main.golden
vendored
2
cmd/guru/testdata/src/imports/main.golden
vendored
@ -33,7 +33,7 @@ defined here
|
||||
-------- @describe ref-type --------
|
||||
reference to type lib.Type (size 8, align 8)
|
||||
defined as int
|
||||
Method set:
|
||||
Methods:
|
||||
method (Type) Method(x *int) *int
|
||||
|
||||
-------- @describe ref-method --------
|
||||
|
Loading…
Reference in New Issue
Block a user