MCPcopy Create free account
hub / github.com/go-python/gopy / NewActivePerson

Function NewActivePerson

_examples/hi/hi.go:87–91  ·  view source on GitHub ↗

NewActivePerson creates a new Person with a certain amount of work done.

(h int)

Source from the content-addressed store, hash-verified

85
86// NewActivePerson creates a new Person with a certain amount of work done.
87func NewActivePerson(h int) (*Person, error) {
88 p := &Person{}
89 err := p.Work(h)
90 return p, err
91}
92
93func (p Person) String() string {
94 return fmt.Sprintf("hi.Person{Name=%q, Age=%d}", p.Name, p.Age)

Callers

nothing calls this directly

Calls 1

WorkMethod · 0.95

Tested by

no test coverage detected