Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IsBool (0.12 sec)

  1. test/named.go

    		str   String = "hello"
    	)
    
    	asArray(a)
    	isArray(a)
    	asArray(*&a)
    	isArray(*&a)
    	asArray(Array{})
    	isArray(Array{})
    
    	asBool(b)
    	isBool(b)
    	asBool(!b)
    	isBool(!b)
    	asBool(true)
    	asBool(*&b)
    	isBool(*&b)
    	asBool(Bool(true))
    	isBool(Bool(true))
    
    	asChan(c)
    	isChan(c)
    	asChan(make(Chan))
    	isChan(make(Chan))
    	asChan(*&c)
    	isChan(*&c)
    	asChan(Chan(nil))
    	isChan(Chan(nil))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  2. test/named1.go

    type Slice []byte
    
    var slice Slice
    
    func asBool(Bool)     {}
    func asString(String) {}
    
    type String string
    
    func main() {
    	var (
    		b    Bool = true
    		i, j int
    		c    = make(chan int)
    		m    = make(Map)
    	)
    
    	asBool(b)
    	asBool(!b)
    	asBool(true)
    	asBool(*&b)
    	asBool(Bool(true))
    	asBool(1 != 2) // ok now
    	asBool(i < j)  // ok now
    
    	_, b = m[2] // ok now
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 04 21:22:23 UTC 2020
    - 984 bytes
    - Viewed (0)
  3. src/log/slog/value_access_benchmark_test.go

    					s = v
    				} else if v, ok := kv.AsInt64(); ok {
    					ii = v
    				} else if v, ok := kv.AsUint64(); ok {
    					u = v
    				} else if v, ok := kv.AsFloat64(); ok {
    					f = v
    				} else if v, ok := kv.AsBool(); ok {
    					bb = v
    				} else if v, ok := kv.AsDuration(); ok {
    					d = v
    				} else if v, ok := kv.AsAny(); ok {
    					a = v
    				} else {
    					panic("bad kind")
    				}
    			}
    		}
    		_ = ii
    		_ = s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 21 20:55:33 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. src/encoding/gob/type_test.go

    	if sint != newsint {
    		t.Errorf("second registration of []int creates new type")
    	}
    	var b []bool
    	sbool := getTypeUnlocked("", reflect.TypeOf(b))
    	if sbool == sint {
    		t.Errorf("registration of []bool creates same type as []int")
    	}
    	str := sbool.string()
    	expected := "[]bool"
    	if str != expected {
    		t.Errorf("slice printed as %q; expected %q", str, expected)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:26:13 UTC 2023
    - 6.1K bytes
    - Viewed (0)
Back to top