From cf6522c7fe093244a14334ced1c90c9791231a3e Mon Sep 17 00:00:00 2001 From: Suhaib Mujahid Date: Sat, 9 May 2020 23:32:17 -0400 Subject: refactor: Rename methods with Get prefix It is not Go idiomatic to put Get into the getter's name. https: //golang.org/doc/effective_go.html#Getters Co-Authored-By: lhchavez --- index.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'index.go') diff --git a/index.go b/index.go index 50538bd..150abf2 100644 --- a/index.go +++ b/index.go @@ -528,7 +528,7 @@ type IndexConflict struct { Their *IndexEntry } -func (v *Index) GetConflict(path string) (IndexConflict, error) { +func (v *Index) Conflict(path string) (IndexConflict, error) { var cancestor *C.git_index_entry var cour *C.git_index_entry @@ -553,6 +553,11 @@ func (v *Index) GetConflict(path string) (IndexConflict, error) { return ret, nil } +// deprecated: You should use `Index.Conflict()` instead. +func (v *Index) GetConflict(path string) (IndexConflict, error) { + return v.Conflict(path) +} + func (v *Index) RemoveConflict(path string) error { cpath := C.CString(path) -- cgit v1.2.3