func ScheduleQueryAndWait(api models.GoQueryAPI, uuid, query string) (models.Rows, error) {
	ctrlcChannel := make(chan os.Signal, 1)
	signal.Notify(ctrlcChannel, os.Interrupt)
	results := make([]map[string]string, 0)
	queryName, err := api.ScheduleQuery(uuid, query)
	if err != nil {
		return results, fmt.Errorf("ScheduleQueryAndWait call failed: %s", err)
	}
	var status string
	for {
		results, status, err = api.FetchResults(queryName)
		if err != nil || status != "Pending" {
			break
		}
		time.Sleep(time.Second)
		fmt.Printf(".")
		select {
		case <-ctrlcChannel:
			return results, fmt.Errorf("Waiting Cancelled")
		default:
		}
	}
	fmt.Printf("\n")
	return results, err
}
ScheduleQueryAndWait schedules the provided query with the proved API, and implements blocking
with a ctrl C interupt
package utils
import (
	"fmt"
	"os"
	"os/signal"
	"time"
	"github.com/AbGuthrie/goquery/v2/models"
)