Recently I have started building a chess game in GoLang and one issue I'm facing is storing different characters (i.e. Pawn, Knight, King) in a single array.
package main
import "fmt"
type character struct {
    currPosition [2]int
}
type Knight struct {
    c character
}
func (K Knight) Move() {
    fmt.Println("Moving Kinght...")
}
type King struct {
    c character
}
func (K King) Move() {
    fmt.Println("Moving King...")
}
In the above case, can we have Knight and King in the same array since they are inherited from the same base class?
Like
characters := []character{Knight{}, King{}}
