Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 258 for hasPrefix (1.2 sec)

  1. src/cmd/go/internal/imports/scan_test.go

    	}
    }
    func TestScanDir(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    
    	dirs, err := os.ReadDir("testdata")
    	if err != nil {
    		t.Fatal(err)
    	}
    	for _, dir := range dirs {
    		if !dir.IsDir() || strings.HasPrefix(dir.Name(), ".") {
    			continue
    		}
    		t.Run(dir.Name(), func(t *testing.T) {
    			tagsData, err := os.ReadFile(filepath.Join("testdata", dir.Name(), "tags.txt"))
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 18 21:55:52 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  2. src/compress/gzip/fuzz_test.go

    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    
    		// decode any base64 encoded test files
    		if strings.HasPrefix(de.Name(), ".base64") {
    			b, err = base64.StdEncoding.DecodeString(string(b))
    			if err != nil {
    				f.Fatalf("failed to decode base64 testdata: %s", err)
    			}
    		}
    
    		f.Add(b)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 18:06:33 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/endtoend_test.go

    	lines := strings.SplitAfter(string(data), "\n")
    Diff:
    	for _, line := range lines {
    		lineno++
    
    		// Ignore include of textflag.h.
    		if strings.HasPrefix(line, "#include ") {
    			continue
    		}
    
    		// Ignore GLOBL.
    		if strings.HasPrefix(line, "GLOBL ") {
    			continue
    		}
    
    		// The general form of a test input line is:
    		//	// comment
    		//	INST args [// printed form] [// hex encoding]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 18:42:59 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  4. src/cmd/trace/jsontrace_test.go

    // E.g. if e.Name is "G42 main.cpu10", this returns "main.cpu10".
    func parseGoroutineName(e *format.Event) string {
    	parts := strings.SplitN(e.Name, " ", 2)
    	if len(parts) != 2 || !strings.HasPrefix(parts[0], "G") {
    		return ""
    	}
    	return parts[1]
    }
    
    // filterBlocked returns an event filter that returns true if the event's
    // "blocked" argument is equal to blocked.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. src/cmd/cover/func.go

    	// Run go list to find the location of every package we care about.
    	pkgs := make(map[string]*Pkg)
    	var list []string
    	for _, profile := range profiles {
    		if strings.HasPrefix(profile.FileName, ".") || filepath.IsAbs(profile.FileName) {
    			// Relative or absolute path.
    			continue
    		}
    		pkg := path.Dir(profile.FileName)
    		if _, ok := pkgs[pkg]; !ok {
    			pkgs[pkg] = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 6.3K bytes
    - Viewed (0)
  6. src/cmd/go/internal/load/flag.go

    		// Special case: -gcflags="" means no flags for command-line arguments
    		// (overrides previous -gcflags="-whatever").
    		f.values = append(f.values, ppfValue{match, []string{}})
    		return nil
    	}
    	if !strings.HasPrefix(v, "-") {
    		i := strings.Index(v, "=")
    		if i < 0 {
    			return fmt.Errorf("missing =<value> in <pattern>=<value>")
    		}
    		if i == 0 {
    			return fmt.Errorf("missing <pattern> in <pattern>=<value>")
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:20:43 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  7. src/cmd/go/internal/vcweb/auth.go

    	fs := http.Dir(dir)
    
    	handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		urlPath := req.URL.Path
    		if urlPath != "" && strings.HasPrefix(path.Base(urlPath), ".") {
    			http.Error(w, "filename contains leading dot", http.StatusBadRequest)
    			return
    		}
    
    		f, err := fs.Open(urlPath)
    		if err != nil {
    			if os.IsNotExist(err) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 17:47:26 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/framepointer/framepointer.go

    			if i := strings.Index(line, "//"); i >= 0 {
    				line = line[:i]
    			}
    			line = strings.TrimSpace(line)
    
    			// We start checking code at a TEXT line for a frameless function.
    			if strings.HasPrefix(line, "TEXT") && strings.Contains(line, "(SB)") && strings.Contains(line, "$0") {
    				active = true
    				continue
    			}
    			if !active {
    				continue
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. src/cmd/internal/obj/stringer.go

    		}
    		index = strings.Index(line, "/*")
    		if index > 0 {
    			line = line[:index]
    		}
    		// Termination condition: Any line with an = changes the sequence,
    		// so stop there, and stop at a closing brace.
    		if strings.HasPrefix(line, "}") || strings.ContainsRune(line, '=') {
    			break
    		}
    		sub := Are.FindStringSubmatch(line)
    		if len(sub) < 2 {
    			continue
    		}
    		if first {
    			fmt.Fprintf(out, "\tobj.A_ARCHSPECIFIC: %q,\n", sub[1])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/rsc.io/markdown/link.go

    		return
    	}
    	switch s[i] {
    	case 'h':
    		var n int
    		if strings.HasPrefix(s[i:], "https://") {
    			n = len("https://")
    		} else if strings.HasPrefix(s[i:], "http://") {
    			n = len("http://")
    		} else {
    			return
    		}
    		return p.parseAutoHTTP(s[i:i+n], s, i, i+n, i+n+1, vd)
    	case 'w':
    		if !strings.HasPrefix(s[i:], "www.") {
    			return
    		}
    		// GitHub Flavored Markdown says to use http://,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 20.7K bytes
    - Viewed (0)
Back to top