๋ฐ์ํ
go reflect
Go์์ ์์ฃผ ์ฌ์ฉํ๋ reflect ๊ตฌ๋ฌธ (Golang reflect)
Go์์ ์์ฃผ ์ฌ์ฉํ๋ reflect ๊ตฌ๋ฌธ (Golang reflect)
2019.06.21๊ตฌ์กฐ์ฒด ๋ฐ ์ธํฐํ์ด์ค ์ ์ type Animal interface{ Move(int) bool } type Cat struct { Name string `custom:"name"` Age int `custom:"age"` Child []string `custom:"child"` } func (c *Cat) Move(distance int) bool { fmt.Println("Cat Move ", distance) return true } type Dog struct{ Name string `custom:"name"` Age int `custom:"age"` Child []string `custom:"child"` } func (d *Dog) Move(distance int) bool { fmt.Print..