From dbe032c347b1a1308a4b880e7c5a06d8dfb4d507 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Sun, 5 Sep 2021 13:59:36 -0700 Subject: Make all non-user-creatable structures non-comparable (#802) This change makes all non-user-creatable structures non-comparable. This makes it easier to add changes later that don't introduce breaking changes from the go compatibility guarantees perspective. This, of course, implies that this change _is_ a breaking change, but since these structures are not intended to be created by users (or de-referenced), it should be okay. --- note.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'note.go') diff --git a/note.go b/note.go index 9df1b9d..05eadb8 100644 --- a/note.go +++ b/note.go @@ -13,6 +13,7 @@ import ( // This object represents the possible operations which can be // performed on the collection of notes for a repository. type NoteCollection struct { + doNotCompare repo *Repository } @@ -139,6 +140,7 @@ func (c *NoteCollection) DefaultRef() (string, error) { // Note type Note struct { + doNotCompare ptr *C.git_note r *Repository } @@ -189,6 +191,7 @@ func (n *Note) Message() string { // NoteIterator type NoteIterator struct { + doNotCompare ptr *C.git_note_iterator r *Repository } -- cgit v1.2.3