func BuildBackupName() string {
	cur_time := time.Now()
	return fmt.Sprintf("backup_%v%v%v%v%v%v", cur_time.Year(), int(cur_time.Month()),
		cur_time.Day(), cur_time.Hour(), cur_time.Minute(), cur_time.Second())
}
Build the backup directory name by time.
package utils
import (
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
	"time"
)
func Min(a, b uint64) uint64 {
	if a < b {
		return a
	}
	return b
}
func Max(a, b uint64) uint64 {
	if a > b {
		return a
	}
	return b
}
func StringInArray(str string, strArray []string) bool {
	sort.Strings(strArray)
	index := sort.SearchStrings(strArray, str)
	return index < len(strArray) && strArray[index] == str
}
func GetOrdinal(name string) (int, error) {
	idx := strings.LastIndexAny(name, "-")
	if idx == -1 {
		return -1, fmt.Errorf("failed to extract ordinal from name: %s", name)
	}
	ordinal, err := strconv.Atoi(name[idx+1:])
	if err != nil {
		return -1, fmt.Errorf("failed to extract ordinal from name: %s", name)
	}
	return ordinal, nil
}
func TouchUpdateFile() error {
	var err error
	var file *os.File
	if file, err = os.Create(FileIndicateUpdate); err != nil {
		return err
	}
	file.Close()
	return nil
}
func RemoveUpdateFile() error {
	return os.Remove(FileIndicateUpdate)
}
func ExistUpdateFile() bool {
	f, err := os.Open(FileIndicateUpdate)
	if os.IsNotExist(err) {
		return false
	} else if err != nil {
		return true
	}
	f.Close()
	return true
}