package main

import (
	"fmt"
	"golang.source-fellows.com/pattern/singleton/internal"
	"sync"
)

func main() {

	count := 100
	wg := sync.WaitGroup{}
	wg.Add(count)
	for i := 0; i < count; i++ {
		go func() {
			i1 := internal.GetInstance()
			fmt.Println(i1.GetName())
			wg.Done()
		}()
	}

	wg.Wait()
}
