I am working with mongo and many of the mongo-driver methods return a slice or a map of interface{}. While processing these results I sometimes need the actual value of the returned results and have to do something like result.(string)

I am concerned whether this can turn out to be a costly operation if there are too many type casts (inside for loops) being done in my code

Also what is the difference between type assertions and type casting

Write your reply...

Never miss a post from Owen Williams, when you sign up for Ednsquare.