func getMapKeys(m map[string]bool) []string {
	keys := make([]string, 0, len(m))
	for k := range m {
		keys = append(keys, k)
	}
	return keys
}
helper function used for verifying inputs
package main
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"os"
	"os/signal"
	"path"
	"strings"
	"syscall"
	"time"
	"github.com/Clever/analytics-util/analyticspipeline"
	discovery "github.com/Clever/discovery-go"
	"github.com/Clever/s3-to-redshift/v3/logger"
	redshift "github.com/Clever/s3-to-redshift/v3/redshift"
	s3filepath "github.com/Clever/s3-to-redshift/v3/s3filepath"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/s3"
	multierror "github.com/hashicorp/go-multierror"
	"github.com/kardianos/osext"
	env "github.com/segmentio/go-env"
)
var (
	host            = os.Getenv("REDSHIFT_HOST")
	port            = os.Getenv("REDSHIFT_PORT")
	dbName          = env.MustGet("REDSHIFT_DB")
	user            = env.MustGet("REDSHIFT_USER")
	pwd             = env.MustGet("REDSHIFT_PASSWORD")
	redshiftRoleARN = env.MustGet("REDSHIFT_ROLE_ARN")
	cleanupWorker   = env.MustGet("CLEANUP_WORKER")
	payloadForSignalFx string
	gearmanAdminURL string
)
func init() {
	gearmanAdminUser := env.MustGet("GEARMAN_ADMIN_USER")
	gearmanAdminPass := env.MustGet("GEARMAN_ADMIN_PASS")
	gearmanAdminPath := env.MustGet("GEARMAN_ADMIN_PATH")
	gearmanAdminURL = generateServiceEndpoint(gearmanAdminUser, gearmanAdminPass, gearmanAdminPath)
}
func generateServiceEndpoint(user, pass, path string) string {
	hostPort, err := discovery.HostPort("gearman-admin", "http")
	if err != nil {
		log.Fatal(err)
	}
	proto, err := discovery.Proto("gearman-admin", "http")
	if err != nil {
		log.Fatal(err)
	}
	return fmt.Sprintf("%s://%s:%s@%s%s", proto, user, pass, hostPort, path)
}
func fatalIfErr(err error, msg string) {
	if err != nil {
		logger.JobFinishedEvent(payloadForSignalFx, false)
		panic(fmt.Sprintf("%s: %s", msg, err))  
	}
}