func DeleteExtraSpace(s string) string {
	s1 := strings.Replace(s, "	", " ", -1)       
	regstr := "\\s{2,}"                          
	reg, _ := regexp.Compile(regstr)             
	s2 := make([]byte, len(s1))                  
	copy(s2, s1)                                 
	spcIndex := reg.FindStringIndex(string(s2))  
	for len(spcIndex) > 0 {                      
		s2 = append(s2[:spcIndex[0]+1], s2[spcIndex[1]:]...)  
		spcIndex = reg.FindStringIndex(string(s2))            
	}
	return string(s2)
}
DeleteExtraSpace remove extra space
package util
import (
	"fmt"
	"net"
	"os"
	"reflect"
	"regexp"
	"runtime"
	"strings"
	"time"
	"github.com/bwmarrin/snowflake"
	"github.com/mbndr/figlet4go"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)
const RFC3339FullDate = "2006-01-02"
func GetCurrentTime() time.Time {
	return time.Now()
}
func GetCurrentTimeString(timeType string) string {
	return GetCurrentTime().Format(timeType)
}
func GetCurrentTimeUnix() int64 {
	return GetCurrentTime().Unix()
}
func CheckFileIsExist(filename string) bool {
	var exist = true
	if _, err := os.Stat(filename); os.IsNotExist(err) {
		exist = false
	}
	return exist
}
func StringInSlice(value string, stringSlice []string) bool {
	for _, v := range stringSlice {
		if v == value {
			return true
		}
	}
	return false
}
func StringContainsInSlice(value string, stringSlice []string) bool {
	for _, v := range stringSlice {
		if strings.Contains(value, v) {
			return true
		}
	}
	return false
}
func SliceInSlice(sliceToCheck []string, slice []string) bool {
	for _, v := range sliceToCheck {
		if !StringInSlice(v, slice) {
			return false
		}
	}
	return true
}
func RecordErrorLevelTwo() (uintptr, string, int) {
	funcName, file, line, _ := runtime.Caller(2)
	return funcName, file, line
}
func Getparentdirectory(path string, level int) string {
	return strings.Join(strings.Split(path, "/")[0:len(strings.Split(path, "/"))-level], "/")
}