Documentation
¶
Overview ¶
Package selection manages fields and methods of types.
Index ¶
- func GroupMethods(defs map[*ast.Ident]types.Object) (implMap map[*types.Func][]Method)
- func HasName(t typ, name string) bool
- type Method
- type Selection
- func (sel *Selection) CanRenameEmbedded(def token.Pos, name, newName string) bool
- func (sel *Selection) CanRenameFieldMethod(name string, pos token.Pos, newName string) bool
- func (sel *Selection) RenameEmbedded(def token.Pos, newName string)
- func (sel *Selection) RenameFieldMethod(name string, pos token.Pos, newName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupMethods ¶
GroupMethods groups all the declared method in a package by the implementation of same interface method. The implMap[mtd] is a list of methods(include mtd itself) that implement the same interface method of mtd.
Types ¶
type Selection ¶
type Selection struct {
// contains filtered or unexported fields
}
Selection manages fields and methods of types.
func (*Selection) CanRenameEmbedded ¶
RenameEmbedded returns whether embedded fields of type T which is defined at a specified position can be renamed to a new name.
func (*Selection) CanRenameFieldMethod ¶
CanRenameFieldMethod returns whether a field or method defined at a specified position can be renamed to a new name.
func (*Selection) RenameEmbedded ¶
RenameEmbedded renames embedded fields of type T which is defined at a specified position to a new name.