I am trying to create a pseudo queue structure and insert jobs structs inside it. What am I doing wrong ?
import "fmt"
type Job struct {
Type string
Url string
}
type Queue [] Job
func main() {
var queue []Queue
job := Job{"test", "http://google.com"}
queue[0] = job
fmt.Println(queue)
}
The code above is throwing:
cannot use job (type Job) as type Queue in assignment