codehost.go (go1.19.src) | : | codehost.go (go1.19.1.src) | ||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
// Downloaded size limits. | // Downloaded size limits. | |||
const ( | const ( | |||
MaxGoMod = 16 << 20 // maximum size of go.mod file | MaxGoMod = 16 << 20 // maximum size of go.mod file | |||
MaxLICENSE = 16 << 20 // maximum size of LICENSE file | MaxLICENSE = 16 << 20 // maximum size of LICENSE file | |||
MaxZipFile = 500 << 20 // maximum size of downloaded zip file | MaxZipFile = 500 << 20 // maximum size of downloaded zip file | |||
) | ) | |||
// A Repo represents a code hosting source. | // A Repo represents a code hosting source. | |||
// Typical implementations include local version control repositories, | // Typical implementations include local version control repositories, | |||
// remote version control servers, and code hosting sites. | // remote version control servers, and code hosting sites. | |||
// A Repo must be safe for simultaneous use by multiple goroutines. | // | |||
// A Repo must be safe for simultaneous use by multiple goroutines, | ||||
// and callers must not modify returned values, which may be cached and shared. | ||||
type Repo interface { | type Repo interface { | |||
// CheckReuse checks whether the old origin information | // CheckReuse checks whether the old origin information | |||
// remains up to date. If so, whatever cached object it was | // remains up to date. If so, whatever cached object it was | |||
// taken from can be reused. | // taken from can be reused. | |||
// The subdir gives subdirectory name where the module root is expected t o be found, | // The subdir gives subdirectory name where the module root is expected t o be found, | |||
// "" for the root or "sub/dir" for a subdirectory (no trailing slash). | // "" for the root or "sub/dir" for a subdirectory (no trailing slash). | |||
CheckReuse(old *Origin, subdir string) error | CheckReuse(old *Origin, subdir string) error | |||
// List lists all tags with the given prefix. | // List lists all tags with the given prefix. | |||
Tags(prefix string) (*Tags, error) | Tags(prefix string) (*Tags, error) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added |