1
0
Fork 0
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.
lesson-go_problems/4-empty-interface-in-go/main.go

19 lines
212 B
Go

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)
}