package main

import (
	"fmt"
)

func printType(val interface{}) {
	switch v := val.(type) {
	case int:
		fmt.Printf("Type: int, Value: %v\n", v)
	case float64:
		fmt.Printf("Type: float64, Value: %v\n", v)
	case string:
		fmt.Printf("Type: string, Value: %v\n", v)
	case bool:
		fmt.Printf("Type: bool, Value: %v\n", v)
	case []int:
		fmt.Printf("Type: []int, Value: %v\n", v)
	case []float64:
		fmt.Printf("Type: []float64, Value: %v\n", v)
	case []string:
		fmt.Printf("Type: []string, Value: %v\n", v)
	case []bool:
		fmt.Printf("Type: []bool, Value: %v\n", v)
	default:
		fmt.Printf("Type: unknown, Value: %v\n", v)
	}
}

func main() {
	printType(42)
	printType(3.14)
	printType("hello")
	printType(true)
	printType([]int{1, 2, 3})
	printType(map[string]int{"a": 1, "b": 2})
	printType(struct{ X int }{X: 99})
	printType(nil)
}
