Skip to content
New issue

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

Support convert to interface{} (any) #5

Open
cmstar opened this issue May 20, 2022 · 0 comments
Open

Support convert to interface{} (any) #5

cmstar opened this issue May 20, 2022 · 0 comments
Labels
feature New feature or request

Comments

@cmstar
Copy link
Owner

cmstar commented May 20, 2022

We got an error "cannot convert int to interface {}" from the code below:

var aa any
err := conv.Convert(1, &aa)
fmt.Println(err)

Consider support converting a value to any (the empty interface), just returns the cloned value like:

conv.ConvertType(value, reflect.TypeOf(value))
@cmstar cmstar added the feature New feature or request label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant