you cant reuse names with top line functions:
package hello
type cat int
func greet(c cat) cat {
return c + 1
}
type dog string
func greet(d dog) dog { // greet redeclared in this block
return d + "one"
}
but you can with methods: package hello
type cat int
func (c cat) greet() cat {
return c + 1
}
type dog string
func (d dog) greet() dog {
return d + "one"
}