This repository has been archived on 2023-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var i interface{}
|
|
describe(i)
|
|
|
|
i = 42
|
|
describe(i)
|
|
|
|
i = "hello"
|
|
describe(i)
|
|
}
|
|
|
|
func describe(i interface{}) {
|
|
fmt.Printf("(%v, %T)\n", i, i)
|
|
}
|