Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleKind (0.09 sec)

  1. src/reflect/example_test.go

    // license that can be found in the LICENSE file.
    
    package reflect_test
    
    import (
    	"bytes"
    	"encoding/json"
    	"fmt"
    	"io"
    	"os"
    	"reflect"
    )
    
    func ExampleKind() {
    	for _, v := range []any{"hi", 42, func() {}} {
    		switch v := reflect.ValueOf(v); v.Kind() {
    		case reflect.String:
    			fmt.Println(v.String())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:04:36 UTC 2022
    - 4.5K bytes
    - Viewed (0)
Back to top