(p *Package, o *types.Const)
| 528 | func (e *Enum) GoType() types.Type { return e.obj.Type() } |
| 529 | |
| 530 | func (e *Enum) AddConst(p *Package, o *types.Const) (*Const, error) { |
| 531 | c, err := newConst(p, o) |
| 532 | if err == nil { |
| 533 | e.items = append(e.items, c) |
| 534 | } |
| 535 | return c, err |
| 536 | } |
| 537 | |
| 538 | func (e *Enum) SortConsts() { |
| 539 | sort.Slice(e.items, func(i, j int) bool { |