Adding 2 array `type`s in Golang : <p>I have a <code>type</code> called <code>EmployeeList</code> which is just an array of <code>Employee</code> structs. </p>

<p>If I have to add/combine <code>EmployeeList</code> objects, I thought I could add them as follows</p>

<pre><code>package main

import (
  "fmt"
)

type Employee struct {
  Id      int    `json:"id"`
  Name string    `json:"name"`
}

type EmployeeList []Employee

func main() {
  listA := EmployeeList{
    Employee{Id: 1, Name: "foo"},
    Employee{Id: 2, Name: "bar"},
  }

  listB := EmployeeList{
    Employee{Id: 3, Name: "baz"},
  }

  // Print the combined lists
  fmt.Println(append(listA, listB))
}
</code></pre>

<p>However the <code>append</code> is throwing an error:</p>

<pre><code>./prog.go:24:21: cannot use listB (type EmployeeList) as type Employee in append
</code></pre>

<p>I get that it has to do with a mismatched / unexpected type, but I'm not sure how to add these two lists together? </p>

<p>Thanks!</p>
