Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 53 for HasPrefix (0.19 sec)

  1. internal/bucket/lifecycle/lifecycle.go

    			continue
    		}
    
    		if len(prefix) > 0 && len(rule.GetPrefix()) > 0 {
    			// we can skip this rule if it doesn't match the tested
    			// prefix.
    			if !strings.HasPrefix(prefix, rule.GetPrefix()) && !strings.HasPrefix(rule.GetPrefix(), prefix) {
    				continue
    			}
    		}
    
    		if rule.NoncurrentVersionExpiration.NoncurrentDays > 0 {
    			return true
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. association.go

    	for name, ok := range selectColumns {
    		columnName := ""
    		if strings.HasPrefix(name, association.Relationship.Name) {
    			if columnName = strings.TrimPrefix(name, association.Relationship.Name); columnName == ".*" {
    				columnName = name
    			}
    		} else if strings.HasPrefix(name, clause.Associations) {
    			columnName = name
    		}
    
    		if columnName != "" {
    			if ok {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top