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
package main import ( "fmt" "github.com/spf13/cast" ) func main() { a := map[string]string{"hello": "123"} r := cast.ToStringMapInt(a) fmt.Printf("%T %#v\n", r, r) r = cast.ToStringMapInt(&a) fmt.Printf("%T %#v\n", r, r) } //OUTPUT: //map[string]int map[string]int{"hello":123} //map[string]int map[string]int{}
If ToStringMapInt does indirect as well, then the ToStringMapInt method will have a friendlier result.
ToStringMapInt
indirect
The text was updated successfully, but these errors were encountered:
What do you mean by "friendlier result"?
Sorry, something went wrong.
a := map[string]string{"hello": "123"}, If cast can help me deal with the pointer, I'd be free to pass in a or &a.
a := map[string]string{"hello": "123"}
a
&a
Method indirect is not called when processing map. Can you please explain why? Thanks
No branches or pull requests
If
ToStringMapInt
doesindirect
as well, then theToStringMapInt
method will have a friendlier result.The text was updated successfully, but these errors were encountered: