You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: runnergroup.go
    path of file: ./repos/scan4all/vendor/github.com/txthinking/runnergroup
    
    the code of the file until where you have to start completion: package runnergroup

import (
	"sync"
	"time"
)

// RunnerGroup is like sync.WaitGroup,
// the diffrence is if one task stops, all will be stopped.
type RunnerGroup struct {
	Runners []*Runner
	End     cha
    
func (g *RunnerGroup) Done() error {
	if len(g.Runners) == 0 {
		return nil
	}
	var e error
	for _, v := range g.Runners {
		for {
			v.lock.Lock()
			if v.status == 0 {
				v.lock.Unlock()
				break
			}
			v.lock.Unlock()
			if err := v.Stop(); err != nil {
				if e == nil {
					e = err
				}
			}
			time.Sleep(300 * time.Millisecond)
		}
	}
	<-g.End
	return e
}