Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for readGoInfo (0.63 sec)

  1. src/cmd/go/internal/modindex/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: Thu Feb 23 10:10:21 UTC 2023
    - 13K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/cmd/go/internal/modindex/build.go

    		return nil, err
    	}
    
    	// TODO(matloob) should we decide whether to ignore binary only here or earlier
    	// when we create the index file?
    	var ignoreBinaryOnly bool
    	if strings.HasSuffix(name, ".go") {
    		err = readGoInfo(f, info)
    		if strings.HasSuffix(name, "_test.go") {
    			ignoreBinaryOnly = true // ignore //go:binary-only-package comments in _test.go files
    		}
    	} else {
    		info.header, err = readComments(f)
    	}
    	f.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 17:39:23 UTC 2023
    - 26.8K bytes
    - Viewed (0)
  5. 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