logo-MindMajix
PostGoLangGoLang
J
James ROBERT

Posted on 21st June 2024|19 views

0
votes

Type Switch Golang

Explain about Type Switch Statement in Go?

1 answers
Answers
P
jordan chris

Posted on 21st June 2024| views

Type Switch is a build that allows different type assertions in sequence. Type switch is identical to the normal switch statement, but type switch specifies types.

Syntax:

Switch b:= c. (type)
{
Case A; // here b has type A
Case C; // here b has type C
default;
 }


 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number