pkg -> Package
This commit is contained in:
parent
8ef813e55d
commit
95b282ea42
4
ysv.go
4
ysv.go
@ -32,13 +32,13 @@ var labelToVcs = map[string]vcs{
|
|||||||
// String returns the name of the vcs ("git", "mercurial", ...).
|
// String returns the name of the vcs ("git", "mercurial", ...).
|
||||||
func (v vcs) String() string { return vcss[v] }
|
func (v vcs) String() string { return vcss[v] }
|
||||||
|
|
||||||
type pkg struct {
|
type Package struct {
|
||||||
Vcs vcs `json":vcs"`
|
Vcs vcs `json":vcs"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Repo string `json:"repo"`
|
Repo string `json:"repo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p pkg) String() string {
|
func (p Package) String() string {
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"<meta name=\"go-import\" content=\"%s %s %s\">",
|
"<meta name=\"go-import\" content=\"%s %s %s\">",
|
||||||
p.Path,
|
p.Path,
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestString(t *testing.T) {
|
func TestString(t *testing.T) {
|
||||||
p := pkg{
|
p := Package{
|
||||||
Path: "mcquay.me/bps",
|
Path: "mcquay.me/bps",
|
||||||
Repo: "https://s.mcquay.me/sm/bps",
|
Repo: "https://s.mcquay.me/sm/bps",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user