|
|
@@ -123,7 +123,7 @@ var gogetTemplate = template.Must(template.New("").Parse(` |
|
|
|
<html> |
|
|
|
<head> |
|
|
|
<meta name="go-import" content="{{.Original.GopkgRoot}} git https://{{.Original.GopkgRoot}}"> |
|
|
|
{{$root := .GitHubRoot}}{{$tree := .GitHubTree}}<meta name="go-source" content="{{.Original.GopkgRoot}} _ https://{{$root}}/tree/{{$tree}}{/dir} https://{{$root}}/blob/{{$tree}}{/dir}/{file}#L{line}"> |
|
|
|
{{$root := .GitHubRoot}}{{$tree := .GitHubTree}}<meta name="go-source" content="{{.Original.GopkgRoot}} _ https://{{$root}}/{{.TreeDir}}/{{$tree}}{/dir} https://{{$root}}/{{.BlobDir}}/{{$tree}}{/dir}/{file}#L{line}"> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
go get {{.GopkgPath}} |
|
|
@@ -197,6 +197,22 @@ func (repo *Repo) GitHubRoot() string { |
|
|
|
return *srcDomainFlag + "/" + repo.User + "/" + repo.Name |
|
|
|
} |
|
|
|
|
|
|
|
// TreeDir returns the repository's web tree dir |
|
|
|
func (repo *Repo) TreeDir() string { |
|
|
|
if *srcDomainFlag != "github.com" { |
|
|
|
return "src/branch" |
|
|
|
} |
|
|
|
return "tree" |
|
|
|
} |
|
|
|
|
|
|
|
// BlobDir returns the repository's dir for source files |
|
|
|
func (repo *Repo) BlobDir() string { |
|
|
|
if *srcDomainFlag != "github.com" { |
|
|
|
return "src/branch" |
|
|
|
} |
|
|
|
return "blob" |
|
|
|
} |
|
|
|
|
|
|
|
// GitHubTree returns the repository tree name for the selected version. |
|
|
|
func (repo *Repo) GitHubTree() string { |
|
|
|
if repo.FullVersion == InvalidVersion { |
|
|
|