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: main.go
    path of file: ./repos/training/example38-concurrency-is-still-not-easy/answer03
    
    the code of the file until where you have to start completion: package main

import (
	"fmt"
	"math/rand"
	"sync"
	"time"
)

func main() {
	const concurrencyProcesses = 10 // limit the maximum number of concurrent reading process tasks
	const jobCount = 100

	var wg sync.WaitGroup
	wg.Add(jobCount)
	found := make(chan int, 100)
	queue := make(chan int, 100)

	for i := 0; i < jobCount; i++ {
		queue <- i
	}
	close(queue)

	for i := 0; i < concurrencyProcesses; i++ {
		go func(queue <-chan int, found chan<- int) {
			for val := range queue {
				defer wg.Done()
				waitTime := rand.Int31n(1000)
				fmt.Println("job:", val, "wait time:", waitTime, "millisecond")
				time.Sleep(time.Duration(waitTime) * time.Millisecond)
				found <- val
			}
		}(queue, found)
	}
	wg.Wait()
	close(found)
	var results []
    
func main() {
	const concurrencyProcesses = 10 // limit the maximum number of concurrent reading process tasks
	const jobCount = 100

	var wg sync.WaitGroup
	wg.Add(jobCount)
	found := make(chan int, 100)
	queue := make(chan int, 100)

	for i := 0; i < jobCount; i++ {
		queue <- i
	}
	close(queue)

	for i := 0; i < concurrencyProcesses; i++ {
		go func(queue <-chan int, found chan<- int) {
			for val := range queue {
				defer wg.Done()
				waitTime := rand.Int31n(1000)
				fmt.Println("job:", val, "wait time:", waitTime, "millisecond")
				time.Sleep(time.Duration(waitTime) * time.Millisecond)
				found <- val
			}
		}(queue, found)
	}
	wg.Wait()
	close(found)
	var results []int
	for p := range found {
		fmt.Println("Finished job:", p)
		results = append(results, p)
	}

	fmt.Println("result:", results)
}