1package git23import "context"45// Tag contains information of a Git tag.6type Tag struct {7 typ ObjectType8 id Oid9 commitID Oid // The ID of the underlying commit10 refspec string11 tagger *Signature12 message string1314 repo *Repository15}1617// Type returns the type of the tag.18func (t *Tag) Type() ObjectType {19 return t.typ20}2122// ID returns the SHA-1 hash of the tag.23func (t *Tag) ID() Oid {24 return t.id25}2627// CommitID returns the commit ID of the tag.28func (t *Tag) CommitID() Oid {29 return t.commitID30}3132// Refspec returns the refspec of the tag.33func (t *Tag) Refspec() string {34 return t.refspec35}3637// Tagger returns the tagger of the tag.38func (t *Tag) Tagger() *Signature {39 return t.tagger40}4142// Message returns the message of the tag.43func (t *Tag) Message() string {44 return t.message45}4647// Commit returns the underlying commit of the tag.48func (t *Tag) Commit(ctx context.Context, opts ...CatFileCommitOptions) (*Commit, error) {49 return t.repo.CatFileCommit(ctx, t.commitID.String(), opts...)50}