In go language how you can check variable type at runtime?
Answer / Surya Kumar Raushan
To check the variable type at runtime in Go, you can use the reflect package. Reflect.TypeOf(variable) will return the type of the variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
Does go (golang) support type inheritance?
Is it true that short variable declaration := can be used only inside a function?
How will you access command line arguments in a go program?
Does go support generic programming?
What are packages in go program?
What is range keyword in go?
Why does my go process use a lot of virtual memory?
How you can write multiline strings in go?
What a modular programming language is?
Why type assertion is used in go language?
What are nil pointers?
In go language how you can check variable type at runtime?