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

Function newStruct

bind/types.go:84–96  ·  view source on GitHub ↗
(p *Package, obj *types.TypeName)

Source from the content-addressed store, hash-verified

82}
83
84func newStruct(p *Package, obj *types.TypeName) (*Struct, error) {
85 sym := p.syms.symtype(obj.Type())
86 if sym == nil {
87 return nil, fmt.Errorf("no such object [%s] in symbols table", obj.Id())
88 }
89 sym.doc = p.getDoc("", obj)
90 s := &Struct{
91 pkg: p,
92 sym: sym,
93 obj: obj,
94 }
95 return s, nil
96}
97
98func (s *Struct) Obj() *types.TypeName {
99 return s.obj

Callers 1

processMethod · 0.85

Calls 2

symtypeMethod · 0.80
getDocMethod · 0.80

Tested by

no test coverage detected