Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
godep update package/ == godep update package
Browse files Browse the repository at this point in the history
Fixes #313
  • Loading branch information
Edward Muller committed Nov 6, 2015
1 parent be17420 commit 218402f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v25 2015/11/05

* `godep update package/` == `godep update package`. Fixes #313

# v24 2015/11/05

* Honor -t during update. Fixes #312
Expand Down
1 change: 1 addition & 0 deletions match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestMatchPattern(t *testing.T) {
{"net/...", "net", true},
{"net/...", "net/http", true},
{"net/...", "not/http", false},
{"net/", "net", true},
}
for _, test := range cases {
ok := matchPattern(test.pat)(test.path)
Expand Down
5 changes: 4 additions & 1 deletion update.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ func matchPattern(pattern string) func(name string) bool {
re := regexp.QuoteMeta(pattern)
re = strings.Replace(re, `\.\.\.`, `.*`, -1)
// Special case: foo/... matches foo too.
if strings.HasSuffix(re, `/.*`) {
switch {
case strings.HasSuffix(re, `/`):
re = re[:len(re)-len(`/`)] + `(/)?`
case strings.HasSuffix(re, `/.*`):
re = re[:len(re)-len(`/.*`)] + `(/.*)?`
}
reg := regexp.MustCompile(`^` + re + `$`)
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const version = 24
const version = 25

0 comments on commit 218402f

Please sign in to comment.