// createWorker creates a worker with a random name. If there is a // failure creating the worker, panics. func createWorker(namespace coordinate.Namespace) coordinate.Worker { // Construct a random worker name: workerName := strings.Map(func(rune) rune { return rune('A' + rand.Intn(26)) }, "12345678") worker, err := namespace.Worker(workerName) if err != nil { panic(err) } return worker }