Files
moxa/_test/type7.go
2018-12-02 17:46:27 +01:00

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