github.com/traefik/yaegi@v0.15.1/_test/type21.go (about) 1 package main 2 3 import ( 4 "reflect" 5 "time" 6 ) 7 8 func main() { 9 t := time.Date(2009, time.November, 10, 23, 4, 5, 0, time.UTC) 10 v := reflect.ValueOf(t.String) 11 f := v.Interface().(func() string) 12 println(f()) 13 } 14 15 // Output: 16 // 2009-11-10 23:04:05 +0000 UTC