|
|
|
|
|
by nkozyra
4258 days ago
|
|
#3 has always bothered me. I feel like: someString := "hello"
someString, err := ReturnStringAndError("world")
if err != nil {
fmt.Println("there's no way this could happen")
} else {
fmt.Println(someString)
}
Should produce an error. |
|
Occasionally, I wonder whether := with several variables on the left hand side should have been to defined to redefine variables (shadowing the earlier definition), but obviously the Go people thought that such shadowing would be worse.