MCPcopy Create free account
hub / github.com/Go-Learning-Land/Go-Learning-Archive / newPerson

Function newPerson

GolangBasics/GoByExample/018Struct.go:11–16  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

9}
10
11func newPerson(name string) *person {
12
13 p := person{name: name}
14 p.age = 42
15 return &p
16}
17
18func main() {
19

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected