mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
14 lines
153 B
Go
14 lines
153 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var i interface{} = "hello"
|
|
if s, ok := i.(string); ok {
|
|
fmt.Println(s, ok)
|
|
}
|
|
}
|
|
|
|
// Output:
|
|
// hello true
|