Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIsValueNil (0.12 sec)

  1. operator/pkg/util/reflect_test.go

    // err is nil.
    func errToString(err error) string {
    	if err == nil {
    		return ""
    	}
    	return err.Error()
    }
    
    // to ptr conversion utility functions
    func toInt8Ptr(i int8) *int8 { return &i }
    
    func TestIsValueNil(t *testing.T) {
    	if !IsValueNil(nil) {
    		t.Error("got IsValueNil(nil) false, want true")
    	}
    	if !IsValueNil((*int)(nil)) {
    		t.Error("got IsValueNil(ptr) false, want true")
    	}
    	if !IsValueNil(map[int]int(nil)) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
Back to top