Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for repeat (0.18 sec)

  1. src/bytes/bytes_test.go

    func TestRepeat(t *testing.T) {
    	for _, tt := range RepeatTests {
    		tin := []byte(tt.in)
    		tout := []byte(tt.out)
    		a := Repeat(tin, tt.count)
    		if !Equal(a, tout) {
    			t.Errorf("Repeat(%q, %d) = %q; want %q", tin, tt.count, a, tout)
    			continue
    		}
    	}
    }
    
    func repeat(b []byte, count int) (err error) {
    	defer func() {
    		if r := recover(); r != nil {
    			switch v := r.(type) {
    			case error:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    		t.Errorf("buf = %q; want foo", buf)
    	}
    
    	r.Reset(strings.NewReader("bar bar"))
    	checkAll(r, "bar bar")
    
    	*r = Reader{} // zero out the Reader
    	r.Reset(strings.NewReader("bar bar"))
    	checkAll(r, "bar bar")
    
    	// Wrap a reader and then Reset to that reader.
    	r.Reset(strings.NewReader("recur"))
    	r2 := NewReader(r)
    	checkAll(r2, "recur")
    	r.Reset(strings.NewReader("recur2"))
    	r2.Reset(r)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  3. cmd/object-api-multipart_test.go

    		t.Fatalf("%s : %s", instanceType, err)
    	}
    
    	uploadIDs = append(uploadIDs, res.UploadID)
    	// Parts with size greater than 5 MiB.
    	// Generating a 6MiB byte array.
    	validPart := bytes.Repeat([]byte("abcdef"), 1*humanize.MiByte)
    	validPartMD5 := getMD5Hash(validPart)
    	// Create multipart parts.
    	// Need parts to be uploaded before CompleteMultiPartUpload can be called tested.
    	parts := []struct {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  4. cmd/iam-store.go

    	//
    	// An in-memory cache must be replaced only if we know for sure that the
    	// values loaded from disk are not stale. They might be stale if the
    	// cached.updatedAt is more recent than the refresh cycle began.
    	if cache.updatedAt.Before(loadedAt) {
    		// No one has updated anything since the config was loaded,
    		// so we just replace whatever is on the disk into memory.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  5. cmd/xl-storage.go

    	// Disallow more than 1024 characters on windows, there
    	// are no known name_max limits on Windows.
    	if runtime.GOOS == "windows" && len(pathName) > 1024 {
    		return errFileNameTooLong
    	}
    
    	// On Unix we reject paths if they are just '.', '..' or '/'
    	if pathName == "." || pathName == ".." || pathName == slashSeparator {
    		return errFileAccessDenied
    	}
    
    	// Check each path segment length is > 255 on all Unix
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  6. cmd/iam.go

    		// Sub policy if set, should be a string reject
    		// malformed/malicious requests.
    		return
    	}
    
    	// Check if policy is parseable.
    	subPolicy, err := policy.ParseConfig(bytes.NewReader([]byte(spolicyStr)))
    	if err != nil {
    		// Log any error in input session policy config.
    		iamLogIf(GlobalContext, err)
    		return
    	}
    
    	// Policy without Version string value reject it.
    	if subPolicy.Version == "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  7. cmd/api-errors.go

    		return ErrRequestTimedout
    	}
    
    	// Only return ErrClientDisconnected if the provided context is actually canceled.
    	// This way downstream context.Canceled will still report ErrRequestTimedout
    	if contextCanceled(ctx) && errors.Is(ctx.Err(), context.Canceled) {
    		return ErrClientDisconnected
    	}
    
    	// Unwrap the error first
    	err = unwrapAll(err)
    
    	switch err {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 91.4K bytes
    - Viewed (7)
  8. istioctl/pkg/describe/describe.go

    	*structpb.Value
    }
    
    const (
    	k8sSuffix = ".svc." + constants.DefaultClusterLocalDomain
    
    	printLevel0 = 0
    	printLevel1 = 3
    	printLevel2 = 6
    )
    
    func printSpaces(numSpaces int) string {
    	return strings.Repeat(" ", numSpaces)
    }
    
    var (
    	// Ignore unmeshed pods.  This makes it easy to suppress warnings about kube-system etc
    	ignoreUnmeshed = false
    
    	describeNamespace string
    )
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  9. cmd/admin-handlers-users.go

    	}
    
    	var updReq madmin.GroupAddRemove
    	err = json.Unmarshal(data, &updReq)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    	// Reject if the group add and remove are temporary credentials, or root credential.
    	for _, member := range updReq.Members {
    		ok, _, err := globalIAMSys.IsTempUser(member)
    		if err != nil && err != errNoSuchUser {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 12:41:13 GMT 2024
    - 77.5K bytes
    - Viewed (0)
  10. cmd/xl-storage_test.go

    	f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0o644)
    	if err != nil {
    		t.Fatal(err)
    	}
    	// Replace first 256 with 'a'.
    	if _, err := f.WriteString(strings.Repeat("a", 256)); err != nil {
    		t.Fatal(err)
    	}
    	f.Close()
    	if err := storage.storage.bitrotVerify(context.Background(), pathJoin(path, volName, fileName), size, algo, nil, shardSize); err == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 66.7K bytes
    - Viewed (0)
Back to top