Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 58 for HasSuffix (0.23 sec)

  1. internal/bucket/versioning/versioning.go

    // prefix, false otherwise.
    func (v Versioning) PrefixEnabled(prefix string) bool {
    	if v.Status != Enabled {
    		return false
    	}
    
    	if prefix == "" {
    		return true
    	}
    	if v.ExcludeFolders && strings.HasSuffix(prefix, "/") {
    		return false
    	}
    
    	for _, sprefix := range v.ExcludedPrefixes {
    		// Note: all excluded prefix patterns end with `/` (See Validate)
    		sprefix.Prefix += "*"
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  2. src/bytes/example_test.go

    	// Output:
    	// true
    	// false
    	// true
    }
    
    func ExampleHasSuffix() {
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("go")))
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("O")))
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("Ami")))
    	fmt.Println(bytes.HasSuffix([]byte("Amigo"), []byte("")))
    	// Output:
    	// true
    	// false
    	// false
    	// true
    }
    
    func ExampleIndex() {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. internal/event/rules.go

    import (
    	"strings"
    
    	"github.com/minio/pkg/v2/wildcard"
    )
    
    // NewPattern - create new pattern for prefix/suffix.
    func NewPattern(prefix, suffix string) (pattern string) {
    	if prefix != "" {
    		if !strings.HasSuffix(prefix, "*") {
    			prefix += "*"
    		}
    
    		pattern = prefix
    	}
    
    	if suffix != "" {
    		if !strings.HasPrefix(suffix, "*") {
    			suffix = "*" + suffix
    		}
    
    		pattern += suffix
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. cmd/object-api-utils.go

    	}
    	return strings.HasPrefix(s, prefix)
    }
    
    // HasSuffix - Suffix matcher string matches suffix in a platform specific way.
    // For example on windows since its case insensitive we are supposed
    // to do case insensitive checks.
    func HasSuffix(s string, suffix string) bool {
    	if runtime.GOOS == globalWindowsOSName {
    		return strings.HasSuffix(strings.ToLower(s), strings.ToLower(suffix))
    	}
    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. cmd/sftp-server-driver.go

    			Prefix:    prefix,
    			Recursive: false,
    		}) {
    			if object.Err != nil {
    				return nil, object.Err
    			}
    
    			if object.Key == prefix {
    				continue
    			}
    
    			isDir := strings.HasSuffix(object.Key, SlashSeparator)
    			files = append(files, &minioFileInfo{
    				p:     pathClean(strings.TrimPrefix(object.Key, prefix)),
    				info:  object,
    				isDir: isDir,
    			})
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  6. cmd/utils.go

    // For ex. "prefix/" is stored as "prefix__XLDIR__"
    func encodeDirObject(object string) string {
    	if HasSuffix(object, slashSeparator) {
    		return strings.TrimSuffix(object, slashSeparator) + globalDirSuffix
    	}
    	return object
    }
    
    // Reverse process of encodeDirObject()
    func decodeDirObject(object string) string {
    	if HasSuffix(object, globalDirSuffix) {
    		return strings.TrimSuffix(object, globalDirSuffix) + slashSeparator
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  7. cmd/admin-server-info.go

    		value := ""
    		if len(split) > 1 {
    			value = split[1]
    		}
    
    		// Do not send sensitive creds.
    		if _, ok := sensitive[key]; ok || strings.Contains(strings.ToLower(key), "password") || strings.HasSuffix(strings.ToLower(key), "key") {
    			props.MinioEnvVars[key] = "*** EXISTS, REDACTED ***"
    			continue
    		}
    		props.MinioEnvVars[key] = value
    	}
    
    	objLayer := newObjectLayerFn()
    	if objLayer != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  8. cmd/xl-storage.go

    	dataUsageInfo, err := scanDataFolder(ctx, disks, s.drivePath, cache, func(item scannerItem) (sizeSummary, error) {
    		// Look for `xl.meta/xl.json' at the leaf.
    		if !strings.HasSuffix(item.Path, SlashSeparator+xlStorageFormatFile) &&
    			!strings.HasSuffix(item.Path, SlashSeparator+xlStorageFormatFileV1) {
    			// if no xl.meta/xl.json found, skip the file.
    			return sizeSummary{}, errSkipFile
    		}
    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)
  9. docs/debugging/pprofgoparser/main.go

    	if searchText != "" {
    		searchRE, err = regexp.Compile(searchText)
    		if err != nil {
    			log.Fatal(err)
    		}
    	}
    
    	for _, arg := range flag.Args() {
    		if !strings.HasSuffix(arg, "-goroutines-before,debug=2.txt") {
    			continue
    		}
    		r, err := parseGoroutineType2(arg)
    		if err != nil {
    			log.Fatal(err)
    		}
    
    		profFName := path.Base(arg)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  10. cmd/object-api-input-checks.go

    	if err := checkListObjsArgs(ctx, bucket, prefix, keyMarker); err != nil {
    		return err
    	}
    	if uploadIDMarker != "" {
    		if HasSuffix(keyMarker, SlashSeparator) {
    			return InvalidUploadIDKeyCombination{
    				UploadIDMarker: uploadIDMarker,
    				KeyMarker:      keyMarker,
    			}
    		}
    		_, err := base64.RawURLEncoding.DecodeString(uploadIDMarker)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top