It has nothing to do with namespaces. It's a general property of scoping:
func foo() {
var a int
{
a := 42
// Cannot access the outer 'a' here.
}
}
And the solution is the same as in the general case: Do not define entities named the same as entities defined in outer scopes if you want to access them (the outer ones). In the above snippet, the inner 'a' would be named eg. 'a2' or 'b' or whatever except 'a'.
dystroy's answer is valid as well, of course. It equals to renaming the outer 'a' to something else.
I'm just trying to point out that your problem is a specific instance of a general issue and the general solution applies to it.