MCPcopy Index your code
hub / github.com/go-python/gopy / AddConst

Method AddConst

bind/types.go:530–536  ·  view source on GitHub ↗
(p *Package, o *types.Const)

Source from the content-addressed store, hash-verified

528func (e *Enum) GoType() types.Type { return e.obj.Type() }
529
530func (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
538func (e *Enum) SortConsts() {
539 sort.Slice(e.items, func(i, j int) bool {

Callers 2

newEnumFunction · 0.95
addConstMethod · 0.80

Calls 1

newConstFunction · 0.85

Tested by

no test coverage detected