diff options
| author | Suhaib Mujahid <[email protected]> | 2020-05-09 23:32:17 -0400 |
|---|---|---|
| committer | Suhaib Mujahid <[email protected]> | 2020-05-09 23:32:17 -0400 |
| commit | cf6522c7fe093244a14334ced1c90c9791231a3e (patch) | |
| tree | eba9030b1449cddf6274b748fbfcf010680d35cd /index.go | |
| parent | 8b51d0db8e40e97283b771a5a51b13bea4651f81 (diff) | |
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 <[email protected]>
Diffstat (limited to 'index.go')
| -rw-r--r-- | index.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |
