在Golang中附加指向切片的指针

I want to append a pointer to a slice.Is it possible..?In Partentnode.children is a slice I want to append it with X as pointer.

https://play.golang.org/p/ghWtxWGOAU

func Tree(Parentnode *Node) {
    if IsvisitedNode(Parentnode.currentvalue - 1) {
        m := MovesArray[Parentnode.currentvalue-1]
        for j := 0; j < 8; j++ {
            if m[j] != 0 {
                var X *Node
                X.parentnode = Parentnode
                X.currentvalue = m[j]
                if IsvisitedNode(m[j]) {
                    Parentnode.children = append(Parentnode.children, *X)
                    Tree(X)
                }
            }
        }
    }
}

You have a off by one error. In main you set Y.currentvalue = 1. Then in Tree currentvalue walks to 64.

X.currentvalue = m[j]
fmt.Printf("cv: %v
",X.currentvalue) //walks to 64
if IsvisitedNode(m[j]) {

An in IsvisitedNode you test that index against visithistory that has 64 indexes, thus stops at index 63. -> index error

var visithistory [64]bool

func IsvisitedNode(position int) bool {
    if visithistory[position] == true {

Things work if you set var visithistory [65]bool but I think you need to rethink you logic here somewhat.