Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readGoInfo (0.25 sec)

  1. src/go/build/read.go

    		r.buf = r.buf[:len(r.buf)-1]
    	}
    	return r.buf, r.err
    }
    
    // readGoInfo expects a Go file as input and reads the file up to and including the import section.
    // It records what it learned in *info.
    // If info.fset is non-nil, readGoInfo parses the file and sets info.parsed, info.parseErr,
    // info.imports and info.embeds.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. src/go/build/deps_test.go

    			continue
    		}
    		info := fileInfo{
    			name: filepath.Join(dir, name),
    			fset: fset,
    		}
    		f, err := os.Open(info.name)
    		if err != nil {
    			return nil, err
    		}
    		err = readGoInfo(f, &info)
    		f.Close()
    		if err != nil {
    			return nil, fmt.Errorf("reading %v: %v", name, err)
    		}
    		if info.parsed.Name.Name == "main" {
    			continue
    		}
    		if bytes.Contains(info.header, buildIgnore) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  3. src/go/build/build.go

    		// binary, no reading
    		return info, nil
    	}
    
    	f, err := ctxt.openFile(info.name)
    	if err != nil {
    		return nil, err
    	}
    
    	if strings.HasSuffix(name, ".go") {
    		err = readGoInfo(f, info)
    		if strings.HasSuffix(name, "_test.go") {
    			binaryOnly = nil // ignore //go:binary-only-package comments in _test.go files
    		}
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
Back to top