从另一个goroutine启动goroutine是什么意思?

From this file, I do not understand why the function startWorker is written like the following.:

func (p *WorkerPool) dispatch() {
    for i := 0; i < p.maxWorkers; i++ {
        p.taskQueue[i] = make(chan func())
        go startWorker(p.taskQueue[i])
    }
}
func startWorker(taskChan chan func()) {
    go func() {
        var task func()
        var ok bool
        for {
            task, ok = <-taskChan
            if !ok {
                break
            }
            // Execute the task.
            task()
        }
    }()
}

If I were the developer, I will write this function like this:

func startWorker(taskChan chan func()) {
    var task func()
    var ok bool
    for {
        task, ok = <-taskChan
        if !ok {
            return
        }
        // Execute the task.
        task()
    }
}

According to Go Best Practices by Francesc Campoy Flores your statement is correct. It is redundant to start a goroutine which also starts another.

func (p *WorkerPool) dispatch() {
    for i := 0; i < p.maxWorkers; i++ {
        p.taskQueue[i] = make(chan func())
        go startWorker(p.taskQueue[i])
    }
}

This is how it's been used in the library. Removing go routine in startWorker makes sense.

Also as Peter mentioned here it is also ok to change the go startWorker() line to startWorker().