Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
11
func
newPerson(name string) *person {
12
13
p := person{name: name}
14
p.age = 42
15
return
&p
16
}
17
18
func
main() {
19
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected