func AppendIfMissingStringSlice(slice []string, str string) []string {
	for _, el := range slice {
		if el == str {
			return slice
		}
	}
	return append(slice, str)
}
AppendIfMissingStringSlice - appends a string to a slice if it is not present
package utils
import (
	"encoding/base64"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"path"
	"path/filepath"
	"revproxy/v2/pkg/common"
	"runtime"
	"strings"
	"time"
	log "github.com/sirupsen/logrus"
)
const (
	ReadRequest         = "Read"
	WriteRequest        = "Write"
	StatusUnAuthorized  = 401
	StatusInternalError = 500
	StatusProxyBusy     = 504
	StatusNotFound      = 404
	Prefix              = "/univmax/restapi"
	PrivatePrefix       = "/univmax/restapi/private"
)
func WriteHTTPError(w http.ResponseWriter, errorMsg string, statusCode int) {
	w.WriteHeader(statusCode)
	_, _ = w.Write([]byte(fmt.Sprintf("%s\n", errorMsg)))
}
func IsStringInSlice(slice []string, str string) bool {
	for _, el := range slice {
		if el == str {
			return true
		}
	}
	return false
}