0

In go it is possible to shadow bult-in types like

int
; so is legal this:

var a int
a = 1
fmt.Println(a)

int := 2  //<-- catching this
fmt.Println(int)

Playground: https://play.golang.org/p/lU6Z8BW7hzS

Is it possible to catch it with some tools?

john Asked question May 13, 2021