Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SplitN (0.18 sec)

  1. 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)
  2. docs/debugging/pprofgoparser/main.go

    	}
    
    	bf := bytes.Buffer{}
    
    	save := func(s string) {
    		bf.WriteString(s + "\n")
    	}
    	reset := func() {
    		bf.Reset()
    	}
    
    	ret := make(map[time.Duration][]string)
    
    	s := bufio.NewScanner(f)
    	s.Split(bufio.ScanLines)
    
    	var (
    		t            time.Duration
    		skip, record bool
    	)
    
    	for s.Scan() {
    		line := s.Text()
    		switch {
    		case skip && line != "":
    		case skip && line == "":
    			skip = false
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. docs/debugging/xl-meta/main.go

    			if err != nil {
    				return err
    			}
    			split, err := rs.Split(mapped)
    			if err != nil {
    				return err
    			}
    			splitFilled, err := rs.Split(filled)
    			if err != nil {
    				return err
    			}
    			ok := len(splitFilled)
    			for i, sh := range splitFilled {
    				for _, v := range sh {
    					if v == 0 {
    						split[i] = nil
    						ok--
    						break
    					}
    				}
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  4. docs/debugging/reorder-disks/main.go

    	mountInfo, err := os.Open("/proc/self/mountinfo")
    	if err != nil {
    		return nil, err
    	}
    	defer mountInfo.Close()
    
    	scanner := bufio.NewScanner(mountInfo)
    	for scanner.Scan() {
    		s := strings.Split(scanner.Text(), " ")
    		if len(s) != 11 {
    			return nil, errors.New("unsupported /proc/self/mountinfo format")
    		}
    		result[s[2]] = s[9]
    	}
    
    	if err := scanner.Err(); err != nil {
    		return nil, err
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  5. docs/debugging/s3-check-md5/main.go

    				log.Println("SKIPPED: encrypted with SSE-KMS do not have md5sum as ETag:", objFullPath(object))
    				continue
    			}
    			parts := 1
    			multipart := false
    			s := strings.Split(object.ETag, "-")
    			switch len(s) {
    			case 1:
    				// nothing to do
    			case 2:
    				if p, err := strconv.Atoi(s[1]); err == nil {
    					parts = p
    				} else {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Feb 17 01:15:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
Back to top