Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 87 for HasPrefix (0.54 sec)

  1. docs/iam/access-manager-plugin.go

    	var res Result
    	if accountValue == "minio" {
    		res.Result = true
    	} else {
    		// All other users may not perform any `s3:Put*` operations.
    		res.Result = true
    		if strings.HasPrefix(actionValue, "s3:Put") {
    			res.Result = false
    		}
    	}
    	fmt.Printf("account: %v | action: %v | allowed: %v\n", accountValue, actionValue, res.Result)
    	json.NewEncoder(w).Encode(res)
    	return
    }
    
    func main() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 17:15:20 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. cmd/net.go

    	if hostAddr == "" {
    		return "", "", errors.New("unable to process empty address")
    	}
    
    	// Simplify the work of url.Parse() and always send a url with
    	if !strings.HasPrefix(hostAddr, "http://") && !strings.HasPrefix(hostAddr, "https://") {
    		hostAddr = "//" + hostAddr
    	}
    
    	// Parse address to extract host and scheme field
    	u, err := url.Parse(hostAddr)
    	if err != nil {
    		return "", "", err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. 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)
  4. src/cmd/api/api_test.go

    	*context = build.Default
    	context.Dir = filepath.Join(testenv.GOROOT(t), "src")
    
    	w := NewWalker(context, context.Dir)
    	for _, pkg := range w.stdPackages {
    		if strings.HasPrefix(pkg, "vendor/") || strings.HasPrefix(pkg, "golang.org/x/") {
    			t.Fatalf("stdPackages contains unexpected package %s", pkg)
    		}
    	}
    }
    
    func TestIssue64958(t *testing.T) {
    	defer func() {
    		if x := recover(); x != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 04 17:31:12 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  5. cmd/iam.go

    	usersPrefix := strings.HasPrefix(event.keyPath, iamConfigUsersPrefix)
    	groupsPrefix := strings.HasPrefix(event.keyPath, iamConfigGroupsPrefix)
    	stsPrefix := strings.HasPrefix(event.keyPath, iamConfigSTSPrefix)
    	svcPrefix := strings.HasPrefix(event.keyPath, iamConfigServiceAccountsPrefix)
    	policyPrefix := strings.HasPrefix(event.keyPath, iamConfigPoliciesPrefix)
    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)
  6. 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)
  7. 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)
  8. internal/disk/stat_linux.go

    	if firstTime {
    		bfs, err := blockdevice.NewDefaultFS()
    		if err == nil {
    			devName := ""
    			diskstats, _ := bfs.ProcDiskstats()
    			for _, dstat := range diskstats {
    				// ignore all loop devices
    				if strings.HasPrefix(dstat.DeviceName, "loop") {
    					continue
    				}
    				if dstat.MajorNumber == info.Major && dstat.MinorNumber == info.Minor {
    					devName = dstat.DeviceName
    					break
    				}
    			}
    			if devName != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  9. utils/utils.go

    	len := runtime.Callers(3, pcs[:])
    	frames := runtime.CallersFrames(pcs[:len])
    	for i := 0; i < len; i++ {
    		// second return value is "more", not "ok"
    		frame, _ := frames.Next()
    		if (!strings.HasPrefix(frame.File, gormSourceDir) ||
    			strings.HasSuffix(frame.File, "_test.go")) && !strings.HasSuffix(frame.File, ".gen.go") {
    			return string(strconv.AppendInt(append([]byte(frame.File), ':'), int64(frame.Line), 10))
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. 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)
Back to top