package sample

import (
	"context"
	"net/http"
	"sync"
)

func Run(ctx context.Context, client *http.Client, url string) error {
	var mu sync.Mutex

	go func() {
		for {
			select {
			case <-ctx.Done():
				return
			default:
				return
			}
		}
	}()

	for i := 0; i < 3; i++ {
		resp, err := client.Get(url)
		if err != nil {
			return err
		}
		_ = resp

		mu.Lock()
		mu.Unlock()
	}

	return nil
}