Rename the revwalk constructor Walk() -> NewRevWalk()

This makes it be more in line with Go conventions and uses its full
name.
This commit is contained in:
Carlos Martín Nieto 2013-09-13 14:11:12 +02:00
parent 56acff247b
commit 16ef893af9
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ func (v *Repository) CreateSymbolicReference(name, target string, force bool) (*
return newReferenceFromC(ptr), nil
}
func (v *Repository) Walk() (*RevWalk, error) {
func (v *Repository) NewRevWalk() (*RevWalk, error) {
walk := new(RevWalk)
ecode := C.git_revwalk_new(&walk.ptr, v.ptr)
if ecode < 0 {

View File

@ -10,7 +10,7 @@ func TestWalk(t *testing.T) {
defer os.RemoveAll(repo.Workdir())
commitId, _ := seedTestRepo(t, repo)
walk, err := repo.Walk()
walk, err := repo.NewRevWalk()
checkFatal(t, err)
walk.Push(commitId)
walk.Sorting(SortTime | SortReverse)