diff options
| author | lhchavez <[email protected]> | 2021-09-05 13:59:36 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-05 13:59:36 -0700 |
| commit | dbe032c347b1a1308a4b880e7c5a06d8dfb4d507 (patch) | |
| tree | bc64fbe9c30ed7dedbff0845c3354be77de1ae30 /reference.go | |
| parent | 549706bb573653469fbcc35c839759987c318d0c (diff) | |
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.
Diffstat (limited to 'reference.go')
| -rw-r--r-- | reference.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/reference.go b/reference.go index e0c7cad..ae49c21 100644 --- a/reference.go +++ b/reference.go @@ -17,11 +17,13 @@ const ( ) type Reference struct { + doNotCompare ptr *C.git_reference repo *Repository } type ReferenceCollection struct { + doNotCompare repo *Repository } @@ -363,11 +365,13 @@ func (v *Reference) Free() { } type ReferenceIterator struct { + doNotCompare ptr *C.git_reference_iterator repo *Repository } type ReferenceNameIterator struct { + doNotCompare *ReferenceIterator } @@ -422,7 +426,7 @@ func (repo *Repository) NewReferenceIteratorGlob(glob string) (*ReferenceIterato } func (i *ReferenceIterator) Names() *ReferenceNameIterator { - return &ReferenceNameIterator{i} + return &ReferenceNameIterator{ReferenceIterator: i} } // NextName retrieves the next reference name. If the iteration is over, |
