I'm wondering why the functions are not working with types of the same kind ? See the following pseudo functions.
Playground: http://play.golang.org/p/ZG1jU8H2ZJ
package main
type typex struct {
email string
id string
}
type typey struct {
email string
id string
}
func useType(t *typex) {
// do something
}
func main() {
x := &typex{
id: "somethng",
}
useType(x) // works
y := &typey{
id: "something",
}
useType(y) // doesn't work ??
}