Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 202 for SplitN (0.2 sec)

  1. cmd/signature-v2.go

    	// Authorization = "AWS" + " " + AWSAccessKeyId + ":" + Signature
    	authFields := strings.Split(r.Header.Get(xhttp.Authorization), " ")
    	if len(authFields) != 2 {
    		return auth.Credentials{}, false, ErrMissingFields
    	}
    
    	// Then will be splitting on ":", this will separate `AWSAccessKeyId` and `Signature` string.
    	keySignFields := strings.Split(strings.TrimSpace(authFields[1]), ":")
    	if len(keySignFields) != 2 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    	return genSplit(s, sep, len(sep), n)
    }
    
    // Split slices s into all subslices separated by sep and returns a slice of
    // the subslices between those separators.
    // If sep is empty, Split splits after each UTF-8 sequence.
    // It is equivalent to SplitN with a count of -1.
    //
    // To split around the first instance of a separator, see Cut.
    func Split(s, sep []byte) [][]byte { return genSplit(s, sep, 0, -1) }
    
    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)
  3. internal/config/config.go

    	tgt = Default
    	if len(s) == 0 {
    		return subSys, inputs, tgt, Errorf("input arguments cannot be empty")
    	}
    	inputs = strings.SplitN(s, KvSpaceSeparator, 2)
    
    	subSystemValue := strings.SplitN(inputs[0], SubSystemSeparator, 2)
    	subSys = subSystemValue[0]
    	if !SubSystems.Contains(subSys) {
    		return subSys, inputs, tgt, Errorf("unknown sub-system %s", s)
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 02 05:11:03 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  4. callbacks/preload.go

    		for _, join := range joins {
    			if _, ok := relationships.Relations[join]; ok && name == join {
    				joined = true
    				continue
    			}
    			joinNames := strings.SplitN(join, ".", 2)
    			if len(joinNames) == 2 {
    				if _, ok := relationships.Relations[joinNames[0]]; ok && name == joinNames[0] {
    					joined = true
    					nestedJoins = append(nestedJoins, joinNames[1])
    				}
    			}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  5. src/bytes/example_test.go

    	// U+0068 'h'
    	// U+0065 'e'
    	// U+0072 'r'
    }
    
    func ExampleSplit() {
    	fmt.Printf("%q\n", bytes.Split([]byte("a,b,c"), []byte(",")))
    	fmt.Printf("%q\n", bytes.Split([]byte("a man a plan a canal panama"), []byte("a ")))
    	fmt.Printf("%q\n", bytes.Split([]byte(" xyz "), []byte("")))
    	fmt.Printf("%q\n", bytes.Split([]byte(""), []byte("Bernardo O'Higgins")))
    	// Output:
    	// ["a" "b" "c"]
    	// ["" "man " "plan " "canal panama"]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. cmd/bucket-lifecycle.go

    // the empty value and an error indicating the parse failure.
    func parseRestoreObjStatus(restoreHdr string) (restoreObjStatus, error) {
    	tokens := strings.SplitN(restoreHdr, ",", 2)
    	progressTokens := strings.SplitN(tokens[0], "=", 2)
    	if len(progressTokens) != 2 {
    		return restoreObjStatus{}, errRestoreHDRMalformed
    	}
    	if strings.TrimSpace(progressTokens[0]) != "ongoing-request" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/podcgroupns.go

    	reader := bytes.NewReader(procCgroupData.Bytes())
    	var cgroups []Cgroup
    	scanner := bufio.NewScanner(reader)
    
    	for scanner.Scan() {
    		token := scanner.Text()
    		substrings := strings.SplitN(token, ":", 3)
    		if len(substrings) < 3 {
    			return nil, fmt.Errorf("cgroup entry contains %v colons, but expected at least 2 colons: %q", len(substrings), token)
    		}
    		cgroups = append(cgroups, Cgroup{
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  8. internal/kms/kes.go

    }
    
    // List returns an array of local KMS Names
    func (c *kesClient) List() []kes.KeyInfo {
    	var kmsSecret []kes.KeyInfo
    	envKMSSecretKey := env.Get(EnvKMSSecretKey, "")
    	values := strings.SplitN(envKMSSecretKey, ":", 2)
    	if len(values) == 2 {
    		kmsSecret = []kes.KeyInfo{
    			{
    				Name: values[0],
    			},
    		}
    	}
    	return kmsSecret
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  9. istioctl/pkg/multixds/gather.go

    		if len(dr.ResourceNames) != 1 {
    			return nil, fmt.Errorf("`ResourceNames` must have one element when `all` flag is turned on")
    		}
    		slice := strings.SplitN(dr.ResourceNames[0], ".", 2)
    		if len(slice) != 2 {
    			return nil, fmt.Errorf("invalid resource name format: %v", slice)
    		}
    		podName := slice[0]
    		ns := slice[1]
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  10. misc/go_android_exec/main.go

    	if err != nil {
    		if ee, ok := err.(*exec.ExitError); ok && len(ee.Stderr) > 0 {
    			return errorf("%v: %s", cmd, ee.Stderr)
    		}
    		return errorf("%v: %w", cmd, err)
    	}
    
    	parts := strings.SplitN(string(bytes.TrimSpace(out)), ":", 4)
    	if len(parts) < 2 {
    		return errorf("%v: missing ':' in output: %q", cmd, out)
    	}
    	importPath = parts[0]
    	if importPath == "" || importPath == "." {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
Back to top