1
0
forked from sm/vain

Merge branch 'master' of dm/vain into master

This commit is contained in:
Stephen McQuay 2016-02-16 18:36:16 -08:00 committed by Gogs
commit bb48f82f9e
2 changed files with 12 additions and 0 deletions

10
vain.go
View File

@ -13,17 +13,27 @@ const (
// Hg is mercurial
Hg
// Svn
Svn
// Bazaar
Bzr
)
var vcss = [...]string{
"git",
"mercurial",
"svn",
"bazaar",
}
var labelToVcs = map[string]vcs{
"git": Git,
"mercurial": Hg,
"hg": Hg,
"svn": Svn,
"bazaar": Bzr,
}
// String returns the name of the vcs ("git", "mercurial", ...).

View File

@ -28,6 +28,8 @@ func TestVcsStrings(t *testing.T) {
}{
{fmt.Sprintf("%+v", Git), "git"},
{fmt.Sprintf("%+v", Hg), "mercurial"},
{fmt.Sprintf("%+v", Svn), "svn"},
{fmt.Sprintf("%+v", Bzr), "bazaar"},
}
for _, test := range tests {
if test.got != test.want {