Compare two slices and delete the unique values in Golang
<p>I have this but it is not working properly :</p>

<pre class="lang-golang prettyprint-override"><code>var i int
var names = []string{"F5", "F7", "C6", "H5", "G5"}
var board = []string{"B4", "D4", "G5", "F5", "F7", "C6"}

for i = 0; i &lt; len(names)-1; i++ {
    for k := 0; k &lt; len(board)-1; k++ {
        if names[i] != board[k] {
            names = append(names[:i], names[i+1:]...)
        }
    }
}
fmt.Printf("%s ", names[i])
</code></pre>