Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 44 for HasPrefix (0.17 sec)

  1. cmd/metacache-entries.go

    func (e metaCacheEntry) isObjectDir() bool {
    	return len(e.metadata) > 0 && strings.HasSuffix(e.name, slashSeparator)
    }
    
    // hasPrefix returns whether an entry has a specific prefix
    func (e metaCacheEntry) hasPrefix(s string) bool {
    	return strings.HasPrefix(e.name, s)
    }
    
    // matches returns if the entries have the same versions.
    // If strict is false we allow signatures to mismatch.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  2. cmd/metacache-server-pool.go

    	if o.Marker < o.Prefix {
    		o.Marker = ""
    	}
    
    	// Marker is set validate pre-condition.
    	if o.Marker != "" && o.Prefix != "" {
    		// Marker not common with prefix is not implemented. Send an empty response
    		if !HasPrefix(o.Marker, o.Prefix) {
    			return entries, io.EOF
    		}
    	}
    
    	// With max keys of zero we have reached eof, return right here.
    	if o.Limit == 0 {
    		return entries, io.EOF
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  3. cmd/object-api-utils.go

    	}
    	// Success.
    	return etag
    }
    
    // HasPrefix - Prefix matcher string matches prefix in a platform specific way.
    // For example on windows since its case insensitive we are supposed
    // to do case insensitive checks.
    func HasPrefix(s string, prefix string) bool {
    	if runtime.GOOS == globalWindowsOSName {
    		return stringsHasPrefixFold(s, prefix)
    	}
    	return strings.HasPrefix(s, prefix)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  4. src/bytes/example_test.go

    	// Output: Fields are: ["foo1" "bar2" "baz3"]
    }
    
    func ExampleHasPrefix() {
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("Go")))
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("C")))
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("")))
    	// Output:
    	// true
    	// false
    	// true
    }
    
    func ExampleHasSuffix() {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. src/cmd/api/main_test.go

    		exitCode = 1
    	}
    	if filepath.Base(filename) == "go1.4.txt" {
    		// No use for blank lines in api files, except go1.4.txt
    		// used them in a reasonable way and we should let it be.
    	} else if strings.HasPrefix(s, "\n") || strings.Contains(s, "\n\n") {
    		log.Printf("%s: contains a blank line", filename)
    		exitCode = 1
    	}
    	if s == "" {
    		log.Printf("%s: empty file", filename)
    		exitCode = 1
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  6. internal/logger/logger.go

    		// Skip duplicate traces that start with file name, "<autogenerated>"
    		// and also skip traces with function name that starts with "runtime."
    		if !strings.HasPrefix(file, "<autogenerated>") &&
    			!strings.HasPrefix(funcName, "runtime.") {
    			// Form and append a line of stack trace into a
    			// collection, 'trace', to build full stack trace
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  7. src/bytes/bytes.go

    	b := bytealg.MakeNoZero(n)[:n:n]
    	bp := copy(b, s[0])
    	for _, v := range s[1:] {
    		bp += copy(b[bp:], sep)
    		bp += copy(b[bp:], v)
    	}
    	return b
    }
    
    // HasPrefix reports whether the byte slice s begins with prefix.
    func HasPrefix(s, prefix []byte) bool {
    	return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix)
    }
    
    // HasSuffix reports whether the byte slice s ends with suffix.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  8. cmd/background-newdisks-heal-ops.go

    	}, BucketInfo{
    		Name: pathJoin(minioMetaBucket, bucketMetaPrefix),
    	})
    
    	// Heal latest buckets first.
    	sort.Slice(buckets, func(i, j int) bool {
    		a, b := strings.HasPrefix(buckets[i].Name, minioMetaBucket), strings.HasPrefix(buckets[j].Name, minioMetaBucket)
    		if a != b {
    			return a
    		}
    		return buckets[i].Created.After(buckets[j].Created)
    	})
    
    	// Load bucket totals
    	cache := dataUsageCache{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  9. internal/grid/connection.go

    		outgoingBytes:      o.outgoingBytes,
    	}
    	if debugPrint {
    		// Random Mux ID
    		c.NextID = rand.Uint64()
    	}
    	if !strings.HasPrefix(o.remote, "https://") && !strings.HasPrefix(o.remote, "wss://") {
    		c.baseFlags |= FlagCRCxxh3
    	}
    	if !strings.HasPrefix(o.local, "https://") && !strings.HasPrefix(o.local, "wss://") {
    		c.baseFlags |= FlagCRCxxh3
    	}
    	if o.publisher != nil {
    		c.traceRequests(o.publisher)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  10. cmd/metrics-v3.go

    	metricsCache := newMetricsCache()
    	mgMap := make(map[collectorPath]*MetricsGroup)
    	bucketMGMap := make(map[collectorPath]*MetricsGroup)
    	for _, mg := range allMetricGroups {
    		if !strings.HasPrefix(string(mg.CollectorPath), clusterBasePath) {
    			mg.AddExtraLabels(
    				serverName, globalLocalNodeName,
    				// poolIndex, strconv.Itoa(globalLocalPoolIdx),
    			)
    		}
    		mg.SetCache(metricsCache)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 17:37:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
Back to top