Add TagsCollection
This commit is contained in:
parent
a2e4e9259b
commit
12311c8528
|
@ -27,6 +27,9 @@ type Repository struct {
|
||||||
// Notes represents the collection of notes and can be used to
|
// Notes represents the collection of notes and can be used to
|
||||||
// read, write and delete notes from this repository.
|
// read, write and delete notes from this repository.
|
||||||
Notes NoteCollection
|
Notes NoteCollection
|
||||||
|
// Tags represents the collection of tags and can be used to create,
|
||||||
|
// list and iterate tags in this repository.
|
||||||
|
Tags TagsCollection
|
||||||
}
|
}
|
||||||
|
|
||||||
func newRepositoryFromC(ptr *C.git_repository) *Repository {
|
func newRepositoryFromC(ptr *C.git_repository) *Repository {
|
||||||
|
@ -36,6 +39,7 @@ func newRepositoryFromC(ptr *C.git_repository) *Repository {
|
||||||
repo.Submodules.repo = repo
|
repo.Submodules.repo = repo
|
||||||
repo.References.repo = repo
|
repo.References.repo = repo
|
||||||
repo.Notes.repo = repo
|
repo.Notes.repo = repo
|
||||||
|
repo.Tags.repo = repo
|
||||||
|
|
||||||
runtime.SetFinalizer(repo, (*Repository).Free)
|
runtime.SetFinalizer(repo, (*Repository).Free)
|
||||||
|
|
||||||
|
|
4
tag.go
4
tag.go
|
@ -42,3 +42,7 @@ func (t Tag) TargetId() *Oid {
|
||||||
func (t Tag) TargetType() ObjectType {
|
func (t Tag) TargetType() ObjectType {
|
||||||
return ObjectType(C.git_tag_target_type(t.cast_ptr))
|
return ObjectType(C.git_tag_target_type(t.cast_ptr))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TagsCollection struct {
|
||||||
|
repo *Repository
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue