We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Go, we use reflect.TypeOf to get type of a value:
tyInt := reflect.TypeOf(int(0)) tyEmptyInterface := reflect.TypeOf((*interface{})(nil)).Elem() // no easy way to get an interface type
We may can introduce a type function to simplify it:
type
tyInt := type(int) tyEmptyInterface := type(interface{})
The text was updated successfully, but these errors were encountered:
mayb be typeOf is an alternate choice. But I'm not very sure about this feature, it seems not very necessary.
typeOf
Sorry, something went wrong.
we can move this faction to another lib package, like "reflects".
Because we use types as parameters, it is not a normal function. It has to be a builtin function like new.
new
No branches or pull requests
In Go, we use reflect.TypeOf to get type of a value:
We may can introduce a
type
function to simplify it:The text was updated successfully, but these errors were encountered: