func isFlagSet(paramName string) (bool, error) {
	strValue, err := readFromEnvOrFile(paramName)
	if err != nil {
		return false, err
	}
	value, err := strconv.ParseBool(strValue)
	if err != nil {
		return false, err
	}
	return value, nil
}
isFlagSet returns the boolean value of an environment variable if present, or from a file otherwise
package utils
import (
	"io/ioutil"
	"os"
	"strconv"
	"github.com/Skyscanner/applicationset-progressive-sync/internal/consts"
)
type Configuration struct {
	ArgoCDAuthToken  string
	ArgoCDServerAddr string
	ArgoCDInsecure   bool
}
func readFromFile(path string) (string, error) {
	file, err := os.Open(path)
	if err != nil {
		return "", err
	}
	defer file.Close()
	data, err := ioutil.ReadAll(file)
	if err != nil {
		return "", err
	}
	return string(data), nil
}
func readFromEnvOrFile(paramName string) (string, error) {
	var err error
	value, ok := os.LookupEnv(paramName)
	if !ok {
		value, err = readFromFile(consts.ConfigDirectory + paramName)
		if err != nil {
			return "", err
		}
	}
	return value, nil
}