func GetListenAddress(portNumber string) string {
	return ":" + portNumber
}
GetListenAddress - Returns the formatted port number
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
}
func AppendIfMissingStringSlice(slice []string, str string) []string {
	for _, el := range slice {
		if el == str {
			return slice
		}
	}
	return append(slice, str)
}
func BasicAuth(credentials common.Credentials) string {
	auth := credentials.UserName + ":" + credentials.Password
	return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
}
func Elapsed(requestID string, op string) func() {
	start := time.Now()
	return func() {
		log.Infof("Request ID: %s - %s time: %v\n", requestID, op, time.Since(start))
	}
}
func GetRequestType(req *http.Request) common.LockType {
	if req.Method == "GET" {
		return ReadRequest
	}
	return WriteRequest
}