package convert import ( "fmt" "testing" ) func TestConv_StrToInt(t *testing.T) { fmt.Println(conv.StrToInt("345")) fmt.Println(conv.StrToInt("3r45")) fmt.Println(conv.StrToInt("3r45", 45)) } func TestConv_StrToInt64(t *testing.T) { fmt.Println(conv.StrToInt64("34567")) fmt.Println(conv.StrToInt64("34ttt567")) fmt.Println(conv.StrToInt64("34ttt567", 789)) }