type apiVersions … type pkgAPIVersions … // sinceVersionFunc returns a string (such as "1.7") specifying which Go // version introduced a symbol, unless it was introduced in Go1, in // which case it returns the empty string. // // The kind is one of "type", "method", or "func". // // The receiver is only used for "methods" and specifies the receiver type, // such as "*Server". // // The name is the symbol name ("Server") and the pkg is the package // ("net/http"). func (v apiVersions) sinceVersionFunc(kind, receiver, name, pkg string) string { … } type versionedRow … type versionParser … // parseFile parses the named $GOROOT/api/goVERSION.txt file. // // For each row, it updates the corresponding entry in // vp.res to VERSION, overwriting any previous value. // As a special case, if goVERSION is "go1", it deletes // from the map instead. func (vp *versionParser) parseFile(name string) error { … } func parseRow(s string) (vr versionedRow, ok bool) { … } // InitVersionInfo parses the $GOROOT/api/go*.txt API definition files to discover // which API features were added in which Go releases. func (c *Corpus) InitVersionInfo() { … } func parsePackageAPIInfo() (apiVersions, error) { … }