package utils import "strconv" func StringToInt(id string) int { if id != "" { id, err := strconv.Atoi(id) if err == nil { return id } } return -1 }