Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
qiushiyan committed Jul 22, 2024
1 parent 6b6d698 commit 1fe4fcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func ParseRepo(src string) (*Repo, error) {
match := re.FindStringSubmatch(src)
if match == nil {
return nil, fmt.Errorf(
"cant recognize %s as a git repository, example: github.com/user/repo",
"can't recognize %s as a git repository, example: github.com/user/repo",
src,
)
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ func TestParse(t *testing.T) {
{
name: "Invalid URL",
url: "invalid-url",
err: fmt.Errorf("could not parse invalid-url"),
err: fmt.Errorf(
"can't recognize %s as a git repository, example: github.com/user/repo",
"invalid-url",
),
},
}

Expand Down

0 comments on commit 1fe4fcc

Please sign in to comment.