Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 102 for HasPrefix (0.19 sec)

  1. istioctl/pkg/writer/envoy/configdump/route.go

    		return ""
    	}
    	config, ok := istioMetadata.Fields["config"]
    	if !ok {
    		return ""
    	}
    	return renderConfig(config.GetStringValue())
    }
    
    func renderConfig(configPath string) string {
    	if strings.HasPrefix(configPath, "/apis/networking.istio.io/v1alpha3/namespaces/") {
    		pieces := strings.Split(configPath, "/")
    		if len(pieces) != 8 {
    			return ""
    		}
    		return fmt.Sprintf("%s.%s", pieces[7], pieces[5])
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu May 11 05:38:17 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  2. cmd/streaming-signature-v4.go

    	var signature [80]byte
    	_, err = io.ReadFull(cr.reader, signature[:])
    	if err == io.EOF {
    		err = io.ErrUnexpectedEOF
    	}
    	if err != nil {
    		cr.err = err
    		return n, cr.err
    	}
    	if !bytes.HasPrefix(signature[:], []byte("chunk-signature=")) {
    		cr.err = errMalformedEncoding
    		return n, cr.err
    	}
    	b, err := cr.reader.ReadByte()
    	if err == io.EOF {
    		err = io.ErrUnexpectedEOF
    	}
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  3. cmd/signature-v4-parser.go

    	// to make parsing easier.
    	v4Auth = strings.ReplaceAll(v4Auth, " ", "")
    	if v4Auth == "" {
    		return sv, ErrAuthHeaderEmpty
    	}
    
    	// Verify if the header algorithm is supported or not.
    	if !strings.HasPrefix(v4Auth, signV4Algorithm) {
    		return sv, ErrSignatureVersionNotSupported
    	}
    
    	// Strip off the Algorithm prefix.
    	v4Auth = strings.TrimPrefix(v4Auth, signV4Algorithm)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. internal/crypto/sse-kms.go

    		json := jsoniter.ConfigCompatibleWithStandardLibrary
    		if err := json.Unmarshal(b, &ctx); err != nil {
    			return "", nil, err
    		}
    	}
    
    	keyID := h.Get(xhttp.AmzServerSideEncryptionKmsID)
    	spaces := strings.HasPrefix(keyID, " ") || strings.HasSuffix(keyID, " ")
    	if spaces {
    		return "", nil, ErrInvalidEncryptionKeyID
    	}
    	return strings.TrimPrefix(keyID, ARNPrefix), ctx, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  5. 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 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  6. internal/http/listener_test.go

    			localIP4.Add(ip.String())
    		}
    	}
    
    	// Filter ipList by IPs those do not start with '127.'.
    	nonLoopBackIPs := localIP4.FuncMatch(func(ip string, matchString string) bool {
    		return !strings.HasPrefix(ip, "127.")
    	}, "")
    	if len(nonLoopBackIPs) == 0 {
    		t.Fatalf("No non-loop back IP address found for this host")
    	}
    	nonLoopBackIP := nonLoopBackIPs.ToSlice()[0]
    	return nonLoopBackIP
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 12 16:09:28 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  7. cni/pkg/plugin/plugin_dryrun_test.go

    	tables := make(map[string]string)
    	for _, table := range parts {
    		// If table is not empty, get table name from the first line
    		lines := strings.Split(strings.Trim(table, "\n"), "\n")
    		if len(lines) >= 1 && strings.HasPrefix(lines[0], "* ") {
    			tableName := lines[0][2:]
    			lines = append(lines, "COMMIT")
    			tables[tableName] = strings.Join(lines, "\n")
    		}
    	}
    	return tables
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  8. cmd/os_unix.go

    // directories that MkdirAll creates.
    // If path is already a directory, MkdirAll does nothing
    // and returns nil.
    func osMkdirAll(dirPath string, perm os.FileMode, baseDir string) error {
    	if baseDir != "" {
    		if strings.HasPrefix(baseDir, dirPath) {
    			return nil
    		}
    	}
    
    	// Slow path: make sure parent exists and then call Mkdir for path.
    	i := len(dirPath)
    	for i > 0 && os.IsPathSeparator(dirPath[i-1]) { // Skip trailing path separator.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. internal/s3select/sql/statement.go

    	stmt.tableAlias = selectAST.From.As
    	// Remove quotes from column aliases
    	if selectAST.Expression != nil {
    		for _, exp := range selectAST.Expression.Expressions {
    			if strings.HasSuffix(exp.As, "'") && strings.HasPrefix(exp.As, "'") && len(exp.As) >= 2 {
    				exp.As = exp.As[1 : len(exp.As)-1]
    			}
    		}
    	}
    	return
    }
    
    func validateTableName(from *TableExpression) error {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 09 17:19:11 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. cmd/admin-heal-ops.go

    	// Check if new heal sequence to be started overlaps with any
    	// existing, running sequence
    	hpath := pathJoin(h.bucket, h.object)
    	for k, hSeq := range ahs.healSeqMap {
    		if !hSeq.hasEnded() && (HasPrefix(k, hpath) || HasPrefix(hpath, k)) {
    			errMsg = "The provided heal sequence path overlaps with an existing " +
    				fmt.Sprintf("heal path: %s", k)
    			return nil, errorCodes.ToAPIErr(ErrHealOverlappingPaths), errMsg
    		}
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
Back to top