(balance, amount int)
| 3 | import "errors" |
| 4 | |
| 5 | func Withdraw(balance, amount int) (newBalance int, err error) { |
| 6 | newBalance = balance - amount |
| 7 | if newBalance < 0 { |
| 8 | return 0, errors.New("overdrawn") |
| 9 | } |
| 10 | return newBalance, nil |
| 11 | } |
nothing calls this directly
no outgoing calls
no test coverage detected