Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IsPrint (0.14 sec)

  1. utils/tests/utils.go

    					t.Errorf("%v: expect: %v, got %v after time round", utils.FileWithLineNum(), expect.(time.Time), curTime)
    				}
    			} else if fmt.Sprint(got) != fmt.Sprint(expect) {
    				t.Errorf("%v: expect: %#v, got %#v", utils.FileWithLineNum(), expect, got)
    			}
    		}
    
    		if fmt.Sprint(got) == fmt.Sprint(expect) {
    			return
    		}
    
    		if reflect.Indirect(reflect.ValueOf(got)).IsValid() != reflect.Indirect(reflect.ValueOf(expect)).IsValid() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. utils/utils.go

    			results[idx] = string(v)
    		case uint:
    			results[idx] = strconv.FormatUint(uint64(v), 10)
    		default:
    			results[idx] = "nil"
    			vv := reflect.ValueOf(v)
    			if vv.IsValid() && !vv.IsZero() {
    				results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface())
    			}
    		}
    	}
    
    	return strings.Join(results, "_")
    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    		if elem == e {
    			return true
    		}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top