diff --git a/cmd/dep/status.go b/cmd/dep/status.go index 24f100f9..e995277b 100644 --- a/cmd/dep/status.go +++ b/cmd/dep/status.go @@ -830,4 +830,4 @@ type byProject []projectConstraint func (p byProject) Len() int { return len(p) } func (p byProject) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p byProject) Less(i, j int) bool { return p[i].Project > p[j].Project } +func (p byProject) Less(i, j int) bool { return p[i].Project < p[j].Project } diff --git a/cmd/dep/status_test.go b/cmd/dep/status_test.go index 140a6425..c65ed0c6 100644 --- a/cmd/dep/status_test.go +++ b/cmd/dep/status_test.go @@ -354,8 +354,8 @@ func TestCollectConstraints(t *testing.T) { {"github.com/darkowlzz/deptest-project-2", ver1}, }, "github.com/sdboyer/deptest": []projectConstraint{ - {"github.com/darkowlzz/deptest-project-2", ver08}, {"github.com/darkowlzz/deptest-project-1", ver1}, + {"github.com/darkowlzz/deptest-project-2", ver08}, }, }, },