Closed
Description
Add an assignment symbol (-
) that returns a named variable if it's not it's zero value. This is definitely NOT an error proposal. If you think it is, I know a doctor who can check your eyes for you. For free! Call me, 😉.
The zero value of an error (which is a value) is nil.
func bezo(baller, dollers string) error {
bucko, - := strconv.Atoi(baller)
bucks, _ := strconv.Atoi(dollers)
fmt.Println("$:", bucko + bucks)
return nil
}
The supreme art of war is to subdue the enemy without fighting. Let them handle their errors.
— Sun Tzu
Implications: #52380