summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-05-09 20:39:51 -0700
committerGitHub <[email protected]>2020-05-09 20:39:51 -0700
commit31f877e249e28c29cc4fcd512381a5a5b26e59d9 (patch)
treeeba9030b1449cddf6274b748fbfcf010680d35cd /index.go
parent8b51d0db8e40e97283b771a5a51b13bea4651f81 (diff)
parentcf6522c7fe093244a14334ced1c90c9791231a3e (diff)
Merge pull request #582 from suhaibmujahid/method-rename
It is not Go idiomatic to put Get into the getter's name
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)