Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 130 for TrimSuffix (0.18 sec)

  1. cmd/iam.go

    		policyMapFile := strings.TrimPrefix(event.keyPath, iamConfigPolicyDBUsersPrefix)
    		user := strings.TrimSuffix(policyMapFile, ".json")
    		err = sys.store.PolicyMappingNotificationHandler(ctx, user, false, regUser)
    	case policyDBSTSUsersPrefix:
    		policyMapFile := strings.TrimPrefix(event.keyPath, iamConfigPolicyDBSTSUsersPrefix)
    		user := strings.TrimSuffix(policyMapFile, ".json")
    		err = sys.store.PolicyMappingNotificationHandler(ctx, user, false, stsUser)
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Wed Oct 15 17:00:45 UTC 2025
    - 76.5K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    func TrimPrefix(s, prefix []byte) []byte {
    	if HasPrefix(s, prefix) {
    		return s[len(prefix):]
    	}
    	return s
    }
    
    // TrimSuffix returns s without the provided trailing suffix string.
    // If s doesn't end with suffix, s is returned unchanged.
    func TrimSuffix(s, suffix []byte) []byte {
    	if HasSuffix(s, suffix) {
    		return s[:len(s)-len(suffix)]
    	}
    	return s
    }
    
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Tue Sep 16 16:42:15 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  3. src/archive/tar/writer_test.go

    		_, ok1 := x.(headerError)
    		_, ok2 := y.(headerError)
    		if ok1 || ok2 {
    			return ok1 && ok2
    		}
    		return x == y
    	}
    	for _, v := range vectors {
    		t.Run(strings.TrimSuffix(path.Base(v.file), ".base64"), func(t *testing.T) {
    			const maxSize = 10 << 10 // 10KiB
    			buf := new(bytes.Buffer)
    			tw := NewWriter(iotest.TruncateWriter(buf, maxSize))
    
    			for i, tf := range v.tests {
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Mon Dec 15 16:34:13 UTC 2025
    - 40.2K bytes
    - Viewed (0)
  4. src/cmd/api/main_test.go

    		log.Printf("feature: %s", f)
    	}
    }
    
    func needApproval(filename string) bool {
    	name := filepath.Base(filename)
    	if name == "go1.txt" {
    		return false
    	}
    	minor := strings.TrimSuffix(strings.TrimPrefix(name, "go1."), ".txt")
    	n, err := strconv.Atoi(minor)
    	if err != nil {
    		log.Fatalf("unexpected api file: %v", name)
    	}
    	return n >= 19 // started tracking approvals in Go 1.19
    }
    
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Feb 20 03:25:33 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  5. cmd/erasure-sets.go

    			}
    			for _, volName := range volsInfo {
    				vi, err := storageDisks[index].StatVol(ctx, pathJoin(minioMetaBucket, bucketMetaPrefix, deletedBucketsPrefix, volName))
    				if err == nil {
    					vi.Name = strings.TrimSuffix(volName, SlashSeparator)
    					delBuckets.Store(volName, vi)
    				}
    			}
    			return nil
    		}, index)
    	}
    	return reduceReadQuorumErrs(ctx, g.Wait(), bucketMetadataOpIgnoredErrs, readQuorum)
    }
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 37K bytes
    - Viewed (1)
  6. cmd/iam-store.go

    				}
    				groupSet.Add(group)
    			}
    		}
    
    		groupPolicyMappingsList := listedConfigItems[policyDBGroupsListKey]
    		for _, item := range groupPolicyMappingsList {
    			group := strings.TrimSuffix(item, ".json")
    			if err = iamOS.loadMappedPolicy(ctx, group, regUser, true, cache.iamGroupPolicyMap); err != nil && !errors.Is(err, errNoSuchPolicy) {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 87.1K bytes
    - Viewed (0)
  7. cmd/data-scanner.go

    			len(existingFolders)+len(newFolders) >= dataScannerForceCompactAtFolders
    
    		if totalFolders := len(existingFolders) + len(newFolders); totalFolders > int(scannerExcessFolders.Load()) {
    			prefixName := strings.TrimSuffix(folder.name, "/") + "/"
    			sendEvent(eventArgs{
    				EventName:  event.PrefixManyFolders,
    				BucketName: f.root,
    				Object: ObjectInfo{
    					Name: prefixName,
    					Size: int64(totalFolders),
    				},
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 45.5K bytes
    - Viewed (0)
  8. cmd/erasure-multipart.go

    			}
    			if errors.Is(err, errFileNotFound) {
    				return result, nil
    			}
    			return result, toObjectErr(err, bucket, object)
    		}
    		break
    	}
    
    	for i := range uploadIDs {
    		uploadIDs[i] = strings.TrimSuffix(uploadIDs[i], SlashSeparator)
    	}
    
    	// S3 spec says uploadIDs should be sorted based on initiated time, we need
    	// to read the metadata entry.
    	var uploads []MultipartInfo
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Oct 24 04:05:31 UTC 2025
    - 47.1K bytes
    - Viewed (0)
  9. src/archive/tar/reader_test.go

    		// a file with a very large GNU 1.0 sparse map.
    		file: "testdata/gnu-sparse-many-zeros.tar.bz2",
    		err:  errSparseTooLong,
    	}}
    
    	for _, v := range vectors {
    		t.Run(strings.TrimSuffix(path.Base(v.file), ".base64"), func(t *testing.T) {
    			path := v.file
    			if v.obscured {
    				tf, err := obscuretestdata.DecodeToTempFile(path)
    				if err != nil {
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Mon Dec 15 16:34:13 UTC 2025
    - 47.5K bytes
    - Viewed (0)
  10. api/go1.1.txt

    pkg bufio, var ErrAdvanceTooFar error
    pkg bufio, var ErrNegativeAdvance error
    pkg bufio, var ErrTooLong error
    pkg bytes, const MinRead = 512
    pkg bytes, func TrimPrefix([]uint8, []uint8) []uint8
    pkg bytes, func TrimSuffix([]uint8, []uint8) []uint8
    pkg bytes, method (*Buffer) Grow(int)
    pkg bytes, method (*Reader) WriteTo(io.Writer) (int64, error)
    pkg compress/flate, const BestCompression = 9
    pkg compress/flate, const BestSpeed = 1
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 2.6M bytes
    - Viewed (0)
Back to top