summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authorSuhaib Mujahid <[email protected]>2020-05-09 23:32:17 -0400
committerSuhaib Mujahid <[email protected]>2020-05-09 23:32:17 -0400
commitcf6522c7fe093244a14334ced1c90c9791231a3e (patch)
treeeba9030b1449cddf6274b748fbfcf010680d35cd /index.go
parent8b51d0db8e40e97283b771a5a51b13bea4651f81 (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.go7
1 files changed, 6 insertions, 1 deletions
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)