Search Options

Results per page
Sort
Preferred Languages
Advance

Results 471 - 480 of 938 for NIL (0.03 sec)

  1. cmd/erasure-server-pool-rebalance_gen_test.go

    	v := rebalanceInfo{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    
    	left, err = msgp.Skip(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 25 19:36:57 UTC 2022
    - 11K bytes
    - Viewed (0)
  2. internal/dsync/drwmutex_test.go

    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewDRWMutex(ds, "test")
    	mu.Unlock(context.Background())
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic2(t *testing.T) {
    	mu := NewDRWMutex(ds, "test-unlock-panic-2")
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  3. internal/lock/lock.go

    	return err
    }
    
    // Provides a new initialized read locked struct from *os.File
    func newRLockedFile(lkFile *LockedFile) (*RLockedFile, error) {
    	if lkFile == nil {
    		return nil, os.ErrInvalid
    	}
    
    	return &RLockedFile{
    		LockedFile: lkFile,
    		refs:       1,
    	}, nil
    }
    
    // RLockedOpenFile - returns a wrapped read locked file, if the file
    // doesn't exist at path returns an error.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  4. internal/config/certs_test.go

    	}
    
    	for _, testCase := range testCases {
    		certs, err := ParsePublicCertFile(testCase.certFile)
    		if !testCase.expectedErr && err != nil {
    			t.Fatalf("error: expected = <nil>, got = %v", err)
    		}
    		if testCase.expectedErr && err == nil {
    			t.Fatal("error: expected err, got = <nil>")
    		}
    		if len(certs) != testCase.expectedResultLen {
    			t.Fatalf("certs: expected = %v, got = %v", testCase.expectedResultLen, len(certs))
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 21.6K bytes
    - Viewed (0)
  5. internal/s3select/sql/jsonpath_test.go

    		result = append(result, parsedVal.Value)
    	}
    	if err := dec.Err(); err != nil {
    		return nil, err
    	}
    	return result, nil
    }
    
    func TestJsonpathEval(t *testing.T) {
    	f, err := os.Open(filepath.Join("jsondata", "books.json"))
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	b, err := io.ReadAll(f)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	p := participle.MustBuild(
    		&JSONPath{},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. internal/store/queuestore_test.go

    	if oErr := queueStore.Open(); oErr != nil {
    		return nil, oErr
    	}
    	return queueStore, nil
    }
    
    // Tear down queue store.
    func tearDownQueueStore() error {
    	return os.RemoveAll(queueDir)
    }
    
    // TestQueueStorePut - tests for store.Put
    func TestQueueStorePut(t *testing.T) {
    	defer func() {
    		if err := tearDownQueueStore(); err != nil {
    			t.Fatal("Failed to tear down store ", err)
    		}
    	}()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. src/cmd/cgo/gcc.go

    	}
    	args, err := quoted.Split(value)
    	if err != nil {
    		return nil, err
    	}
    	if len(args) == 0 {
    		return nil, errors.New("CC not set and no default found")
    	}
    	if _, err := exec.LookPath(args[0]); err != nil {
    		return nil, fmt.Errorf("C compiler %q not found: %v", args[0], err)
    	}
    	return args[:len(args):len(args)], nil
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 18 15:07:34 UTC 2024
    - 97.1K bytes
    - Viewed (0)
  8. prepare_stmt.go

    	}
    
    	beginner, ok := db.ConnPool.(ConnPoolBeginner)
    	if !ok {
    		return nil, ErrInvalidTransaction
    	}
    
    	connPool, err := beginner.BeginTx(ctx, opt)
    	if err != nil {
    		return nil, err
    	}
    	if tx, ok := connPool.(Tx); ok {
    		return &PreparedStmtTX{PreparedStmtDB: db, Tx: tx}, nil
    	}
    	return nil, ErrInvalidTransaction
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/prefix.go

    	var s string
    	if err = d.DecodeElement(&s, &start); err != nil {
    		return err
    	}
    	*p = Prefix{string: s, set: true}
    	return nil
    }
    
    // MarshalXML - decodes XML data.
    func (p Prefix) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if !p.set {
    		return nil
    	}
    	return e.EncodeElement(p.string, startElement)
    }
    
    // String returns the prefix string
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 15 14:45:25 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. src/archive/tar/reader.go

    		if err := discard(tr.r, tr.curr.physicalRemaining()); err != nil {
    			return nil, err
    		}
    		if _, err := tryReadFull(tr.r, tr.blk[:tr.pad]); err != nil {
    			return nil, err
    		}
    		tr.pad = 0
    
    		hdr, rawHdr, err := tr.readHeader()
    		if err != nil {
    			return nil, err
    		}
    		if err := tr.handleRegularFile(hdr); err != nil {
    			return nil, err
    		}
    		format.mayOnlyBe(hdr.Format)
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
Back to top