Answers for "switch case golang example"

Go
1

switch type golang

var value interface{} = "Hello Grepper"
switch vale.(type){
	case string:
    	fmt.Println("It is a string")
    case int:
    	fmt.Println("It is a int")
    default:
    	fmt.Println("Not sure")
}
Posted by: Guest on June-25-2021

Code answers related to "switch case golang example"

Browse Popular Code Answers by Language