Source File
discovery.go
Belonging Package
golang.org/x/pkgsite/internal
package internal
import (
)
LatestVersion = "latest"
MainVersion = "main"
MasterVersion = "master"
UnknownModulePath = "unknownModulePath"
)
var DefaultBranches = map[string]bool{
MainVersion: true,
MasterVersion: true,
}
type ModuleInfo struct {
ModulePath string
Version string
CommitTime time.Time
type VersionMap struct {
ModulePath string
RequestedVersion string
ResolvedVersion string
GoModPath string
Status int
Error string
UpdatedAt time.Time
}
func ( *ModuleInfo) () string {
return SeriesPathForModule(.ModulePath)
}
func ( string) string {
, , := module.SplitPathVersion()
return
}
func ( string) (string, int) {
, , := module.SplitPathVersion()
if ! {
return "", 0
}
if == "" {
return , 1
func (, string) string {
return strings.TrimPrefix(strings.TrimPrefix(, ), "/")
}
func (, string) string {
if == stdlib.ModulePath {
return
}
return path.Join(SeriesPathForModule(), Suffix(, ))
}
type Module struct {
type ModuleVersionState struct {
ModulePath string
Version string
NumPackages *int
}
type PackageVersionState struct {
PackagePath string
ModulePath string
Version string
Status int
Error string
}
type SearchResult struct {
Name string
PackagePath string
ModulePath string
Version string
Synopsis string
Licenses []string
CommitTime time.Time
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |