1
0
Fork 0
This commit is contained in:
Alex Kotov 2020-11-17 09:03:53 +05:00
parent 0c63b698be
commit 6a315ca521
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,2 @@
all:
go run main.go

View file

@ -0,0 +1,18 @@
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)
}