Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 457 for SplitN (0.26 sec)

  1. 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)
  2. 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)
  3. 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)
  4. cmd/signature-v4-parser.go

    	creds := strings.SplitN(strings.TrimSpace(credElement), "=", 2)
    	if len(creds) != 2 {
    		return ch, ErrMissingFields
    	}
    	if creds[0] != "Credential" {
    		return ch, ErrMissingCredTag
    	}
    	credElements := strings.Split(strings.TrimSpace(creds[1]), SlashSeparator)
    	if len(credElements) < 5 {
    		return ch, ErrCredMalformed
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  5. internal/kms/single-key.go

    //
    //	<key-id>:<base64-key>
    //
    // The returned KMS implementation uses the parsed
    // key ID and key to derive new DEKs and decrypt ciphertext.
    func Parse(s string) (KMS, error) {
    	v := strings.SplitN(s, ":", 2)
    	if len(v) != 2 {
    		return nil, errors.New("kms: invalid master key format")
    	}
    
    	keyID, b64Key := v[0], v[1]
    	key, err := base64.StdEncoding.DecodeString(b64Key)
    	if err != nil {
    		return nil, err
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  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. 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)
  10. cmd/admin-handlers-config-kv.go

    	if objectAPI == nil {
    		return
    	}
    
    	cfg := globalServerConfig.Clone()
    	vars := mux.Vars(r)
    	key := vars["key"]
    
    	var subSys, target string
    	{
    		ws := strings.SplitN(key, madmin.SubSystemSeparator, 2)
    		subSys = ws[0]
    		if len(ws) == 2 {
    			if ws[1] == "" {
    				target = madmin.Default
    			} else {
    				target = ws[1]
    			}
    		}
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
Back to top