()
| 395 | } |
| 396 | |
| 397 | func ExampleToInterface() { |
| 398 | val := reflect.ValueOf("abc") |
| 399 | iVal, ok := ToInterface(val) |
| 400 | |
| 401 | fmt.Printf("%T\n", iVal) |
| 402 | fmt.Printf("%v\n", iVal) |
| 403 | fmt.Println(ok) |
| 404 | |
| 405 | // Output: |
| 406 | // string |
| 407 | // abc |
| 408 | // true |
| 409 | } |
| 410 | |
| 411 | func ExampleUtf8ToGbk() { |
| 412 | utf8Data := []byte("hello") |
nothing calls this directly
no test coverage detected
searching dependent graphs…