예제 #1
0
func (s *scheduler) run(count int) {
	s.jobs = make(chan check, 10)
	s.done = make(chan check, 10)

	for w := 1; w <= count; w++ {
		go s.worker(goherokuname.Haikunate())
	}

	for {
		c := <-s.done
		if c.pass {
			log.Notice(fmt.Sprintf("%s : PASSED : %s", c.name, c.message))
		} else {
			log.Warning(fmt.Sprintf("%s : FAILED : %s", c.name, c.message))
		}
	}
}
예제 #2
0
// newUser will eventually return a user object, but for now it is only the username
func newUser() string {
	return goherokuname.Haikunate()
}