Answer Posted / Km Pooja Yadav
"Type assertion is used in Go to extract the value of a variable with a specific concrete type within a type switch or interface value. It takes the form: variable.(type) or var.(type). It checks if the variable's value can be converted to the specified type and, if successful, returns the converted value. If not, it panics with a runtime error."n
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category