Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for TrimSpace (0.21 sec)

  1. src/cmd/cgo/internal/swig/swig_test.go

    	// See https://golang.org/issue/23469.
    	output, err := exec.Command(swig, "-go", "-swiglib").Output()
    	if err != nil {
    		t.Skip("swig is missing Go support")
    	}
    	swigDir := strings.TrimSpace(string(output))
    
    	_, err = os.Stat(filepath.Join(swigDir, "go"))
    	if err != nil {
    		t.Skip("swig is missing Go support")
    	}
    
    	// Check that swig has a new enough version.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/cgo/ast.go

    	if !ok {
    		return
    	}
    
    	if n.Doc == nil {
    		return
    	}
    	for _, c := range n.Doc.List {
    		if !strings.HasPrefix(c.Text, "//export ") {
    			continue
    		}
    
    		name := strings.TrimSpace(c.Text[9:])
    		if name == "" {
    			error_(c.Pos(), "export missing name")
    		}
    
    		if name != n.Name.Name {
    			error_(c.Pos(), "export comment has wrong name %q, want %q", name, n.Name.Name)
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue1435.go

    			//    "... : bad file descriptor.
    			continue
    		}
    		lines := strings.Split(string(d), "\n")
    		for _, line := range lines {
    			// Different kernel vintages pad differently.
    			line = strings.TrimSpace(line)
    			if strings.HasPrefix(line, "Pid:\t") {
    				// On loaded systems, it is possible
    				// for a TID to be reused really
    				// quickly. As such, we need to
    				// validate that the thread status
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/godefs.go

    			i := strings.Index(c.Text, "+godefs map")
    			if i < 0 {
    				continue
    			}
    			s := strings.TrimSpace(c.Text[i+len("+godefs map"):])
    			i = strings.Index(s, " ")
    			if i < 0 {
    				fmt.Fprintf(os.Stderr, "invalid +godefs map comment: %s\n", c.Text)
    				continue
    			}
    			override["_Ctype_"+strings.TrimSpace(s[:i])] = strings.TrimSpace(s[i:])
    		}
    	}
    	for _, n := range f.Name {
    		if s := override[n.Go]; s != "" {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/asm/endtoend_test.go

    		case 1:
    			// no comment
    		case 2:
    			// might be printed form or hex
    			note := strings.TrimSpace(parts[1])
    			if isHexes(note) {
    				hexes = note
    			} else {
    				printed = note
    			}
    		case 3:
    			// printed form, then hex
    			printed = strings.TrimSpace(parts[1])
    			hexes = strings.TrimSpace(parts[2])
    			if !isHexes(hexes) {
    				t.Errorf("%s:%d: malformed hex instruction encoding: %s", input, lineno, line)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  7. misc/ios/detect.go

    }
    
    func plistExtract(fname string, path string) ([]byte, error) {
    	out, err := exec.Command("/usr/libexec/PlistBuddy", "-c", "Print "+path, fname).CombinedOutput()
    	if err != nil {
    		return nil, err
    	}
    	return bytes.TrimSpace(out), nil
    }
    
    func getLines(cmd *exec.Cmd) [][]byte {
    	out := output(cmd)
    	lines := bytes.Split(out, []byte("\n"))
    	// Skip the empty line at the end.
    	if len(lines[len(lines)-1]) == 0 {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 19 23:33:30 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. src/cmd/cgo/gcc.go

    			continue
    		}
    
    		line = strings.TrimSpace(line[8:])
    
    		var key, val string
    		spaceIndex := strings.Index(line, " ")
    		tabIndex := strings.Index(line, "\t")
    
    		if spaceIndex == -1 && tabIndex == -1 {
    			continue
    		} else if tabIndex == -1 || (spaceIndex != -1 && spaceIndex < tabIndex) {
    			key = line[0:spaceIndex]
    			val = strings.TrimSpace(line[spaceIndex:])
    		} else {
    			key = line[0:tabIndex]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  9. src/cmd/api/main_test.go

    		log.Printf("%s: missing final newline", filename)
    		exitCode = 1
    	}
    	s = aliasReplacer.Replace(s)
    	lines := strings.Split(s, "\n")
    	var nonblank []string
    	for i, line := range lines {
    		line = strings.TrimSpace(line)
    		if line == "" || strings.HasPrefix(line, "#") {
    			continue
    		}
    		if needApproval {
    			feature, approval, ok := strings.Cut(line, "#")
    			if !ok {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  10. src/archive/tar/writer_test.go

    	"time"
    )
    
    func bytediff(a, b []byte) string {
    	const (
    		uniqueA  = "-  "
    		uniqueB  = "+  "
    		identity = "   "
    	)
    	var ss []string
    	sa := strings.Split(strings.TrimSpace(hex.Dump(a)), "\n")
    	sb := strings.Split(strings.TrimSpace(hex.Dump(b)), "\n")
    	for len(sa) > 0 && len(sb) > 0 {
    		if sa[0] == sb[0] {
    			ss = append(ss, identity+sa[0])
    		} else {
    			ss = append(ss, uniqueA+sa[0])
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
Back to top