func (c *TagsCollection) List() ([]string, error) {
	var strC C.git_strarray
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	ecode := C.git_tag_list(&strC, c.repo.ptr)
	if ecode < 0 {
		return nil, MakeGitError(ecode)
	}
	defer C.git_strarray_free(&strC)
	tags := makeStringsFromCStrings(strC.strings, int(strC.count))
	return tags, nil
}
List returns the names of all the tags in the repository,
eg: ["v1.0.1", "v2.0.0"].
package git
import "C"
import (
	"runtime"
	"unsafe"
)
type Tag struct {
	gitObject
	cast_ptr *C.git_tag
}
func (t Tag) Message() string {
	return C.GoString(C.git_tag_message(t.cast_ptr))
}
func (t Tag) Name() string {
	return C.GoString(C.git_tag_name(t.cast_ptr))
}
func (t Tag) Tagger() *Signature {
	cast_ptr := C.git_tag_tagger(t.cast_ptr)
	return newSignatureFromC(cast_ptr)
}
func (t Tag) Target() Object {
	var ptr *C.git_object
	ret := C.git_tag_target(&ptr, t.cast_ptr)
	if ret != 0 {
		return nil
	}
	return allocObject(ptr, t.repo)
}
func (t Tag) TargetId() *Oid {
	return newOidFromC(C.git_tag_target_id(t.cast_ptr))
}
func (t Tag) TargetType() ObjectType {
	return ObjectType(C.git_tag_target_type(t.cast_ptr))
}
type TagsCollection struct {
	repo *Repository
}
func (c *TagsCollection) Create(
	name string, commit *Commit, tagger *Signature, message string) (*Oid, error) {
	oid := new(Oid)
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	cmessage := C.CString(message)
	defer C.free(unsafe.Pointer(cmessage))
	taggerSig, err := tagger.toC()
	if err != nil {
		return nil, err
	}
	defer C.git_signature_free(taggerSig)
	ctarget := commit.gitObject.ptr
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	ret := C.git_tag_create(oid.toC(), c.repo.ptr, cname, ctarget, taggerSig, cmessage, 0)
	if ret < 0 {
		return nil, MakeGitError(ret)
	}
	return oid, nil
}
func (c *TagsCollection) CreateLightweight(name string, commit *Commit, force bool) (*Oid, error) {
	oid := new(Oid)
	cname := C.CString(name)
	defer C.free(unsafe.Pointer(cname))
	ctarget := commit.gitObject.ptr
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	err := C.git_tag_create_lightweight(oid.toC(), c.repo.ptr, cname, ctarget, cbool(force))
	if err < 0 {
		return nil, MakeGitError(err)
	}
	return oid, nil
}