Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for IsIntKind (0.31 sec)

  1. operator/pkg/util/reflect.go

    	if IsValueNil(val) {
    		return 0, false
    	}
    	v := reflect.ValueOf(val)
    	switch {
    	case IsIntKind(v.Kind()):
    		return int(v.Int()), true
    	case IsUintKind(v.Kind()):
    		return int(v.Uint()), true
    	}
    	return 0, false
    }
    
    // IsIntKind reports whether k is an integer kind of any size.
    func IsIntKind(k reflect.Kind) bool {
    	switch k {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 8.6K bytes
    - Viewed (0)
Back to top