Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/derekbanas/Go-Tutorial
/ GetBalance
Method
GetBalance
hellogo.go:250–254 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
248
}
249
250
func
(a *Account) GetBalance() int {
251
a.lock.Lock()
252
defer
a.lock.Unlock()
253
return
a.balance
254
}
255
256
func
(a *Account) Withdraw(v int) {
257
a.lock.Lock()
Callers
1
main
Function · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected