Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FindSubmatch (0.12 sec)

  1. src/cmd/go/internal/modload/init.go

    )
    
    func findImportComment(file string) string {
    	data, err := os.ReadFile(file)
    	if err != nil {
    		return ""
    	}
    	m := importCommentRE.FindSubmatch(data)
    	if m == nil {
    		return ""
    	}
    	path, err := strconv.Unquote(string(m[1]))
    	if err != nil {
    		return ""
    	}
    	return path
    }
    
    // WriteOpts control the behavior of WriteGoMod.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/test/test.go

    	// The string looks like
    	//	test coverage for encoding/binary: 79.9% of statements
    	// Extract the piece from the percentage to the end of the line.
    	re := regexp.MustCompile(`coverage: (.*)\n`)
    	matches := re.FindSubmatch(out)
    	if matches == nil {
    		// Probably running "go test -cover" not "go test -cover fmt".
    		// The coverage output will appear in the output directly.
    		return ""
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
Back to top