Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseMetaGoImports (0.21 sec)

  1. src/cmd/go/internal/vcs/discovery.go

    		return input, nil
    	default:
    		return nil, fmt.Errorf("can't decode XML document using charset %q", charset)
    	}
    }
    
    // parseMetaGoImports returns meta imports from the HTML in r.
    // Parsing ends at the end of the <head> section or the beginning of the <body>.
    func parseMetaGoImports(r io.Reader, mod ModuleMode) ([]metaImport, error) {
    	d := xml.NewDecoder(r)
    	d.CharsetReader = charsetReader
    	d.Strict = false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 11 18:14:49 UTC 2020
    - 2.6K bytes
    - Viewed (0)
  2. src/cmd/go/internal/vcs/discovery_test.go

    			{"myitcv.io", "git", "https://github.com/myitcv/x"},
    		},
    	},
    }
    
    func TestParseMetaGoImports(t *testing.T) {
    	for i, tt := range parseMetaGoImportsTests {
    		out, err := parseMetaGoImports(strings.NewReader(tt.in), tt.mod)
    		if err != nil {
    			t.Errorf("test#%d: %v", i, err)
    			continue
    		}
    		if !reflect.DeepEqual(out, tt.out) {
    			t.Errorf("test#%d:\n\thave %q\n\twant %q", i, out, tt.out)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 11 18:14:49 UTC 2020
    - 3.4K bytes
    - Viewed (0)
Back to top