This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package convert
import "strconv"
// IntToStr int类型转字符串
// num int类型的数据,不区分int64或者int类型
func (c *Conv) IntToStr(num any) string {
var str string
switch num.(type) {
case int:
str = strconv.Itoa(num.(int))
case int64:
str = strconv.FormatInt(num.(int64), 10)
case int32:
str = strconv.FormatInt(int64(num.(int32)), 10)
case string:
str = num.(string)
default:
str = ""
}
return str