Golang mixed assignment and declaration
What you’re experiencing is commonly known as “variable shadowing”. When you use := with any variable in an inner scope, including in statements like if and for despite the lack of braces, a new value and type are associated with that variable: n := “Example” //Prints the string variable `n` to standard output and // … Read more