You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone. I'm facing the issue is I cannot convert the alias type to int32.
This is an example
package main
import (
"testing"
"github.com/spf13/cast"
"github.com/stretchr/testify/require"
)
type a string
func Test_Case(t *testing.T) {
var anum a = "1"
c := cast.ToInt32(anum)
require.Equal(t, int32(1), c)
}
Thank you for your help
The text was updated successfully, but these errors were encountered:
Hello everyone. I'm facing the issue is I cannot convert the alias type to int32.
This is an example
Thank you for your help
The text was updated successfully, but these errors were encountered: