Take this incredibly simple example. which shows variable assignment in and out of a block.
On compilation this results in: u declared and not used
var u string
{
u, err := url.Parse("http://bing.com/search?q=dotnet")
if err != nil {
log.Fatal(err)
}
}
log.Debug(u)
This simulates a logic block during which we might assess several things and set a var to the value we like depending on logic evaluation. How is this possible?