Versions in this module Expand all Collapse all v0 v0.0.7 Dec 26, 2022 v0.0.6 Dec 9, 2022 v0.0.5 Dec 8, 2022 v0.0.4 Dec 8, 2022 Changes in this version + const GT + const LT + const NL + const SP + func ReadObjectFile(path string) (data []byte, err error) type Commit + func (ci *Commit) ParentCommit(n int) *Commit + type Index struct type Oid + func (o *Oid) Short() string type TreeEntry + Oid *Oid v0.0.3 Dec 6, 2022 v0.0.2 Dec 6, 2022 Changes in this version type Repository + func (repos *Repository) GetBranch() string + func (repos *Repository) GetCommit() (*Commit, error) + func (repos *Repository) GetOrigin() string v0.0.1 Dec 5, 2022 Changes in this version + const FileModeBlob + const FileModeBlobExec + const FileModeCommit + const FileModeSymlink + const FileModeTree + type Blob struct + func (b *Blob) Contents() []byte + func (b *Blob) Size() int + type Commit struct + Author *Signature + CommitMessage string + Committer *Signature + Oid *Oid + Tree *Tree + func (ci *Commit) Id() *Oid + func (ci *Commit) Message() string + func (ci *Commit) Parent(n int) *Commit + func (ci *Commit) ParentCount() int + func (ci *Commit) ParentId(n int) *Oid + func (ci *Commit) TreeId() *Oid + type Object struct + Oid *Oid + Type ObjectType + type ObjectType int + const ObjectBlob + const ObjectCommit + const ObjectTag + const ObjectTree + func (t ObjectType) String() string + type Oid struct + Bytes SHA1 + func NewOid(b []byte) (*Oid, error) + func NewOidFromByteString(b []byte) (*Oid, error) + func (o *Oid) Equal(oid2 *Oid) bool + func (o *Oid) String() string + type Reference struct + Name string + Oid *Oid + func (r *Reference) Target() *Oid + type Repository struct + Path string + func OpenRepository(path string) *Repository + func (repos *Repository) GetCurrentCommit() (*Commit, error) + func (repos *Repository) LookupBlob(oid *Oid) (*Blob, error) + func (repos *Repository) LookupCommit(oid *Oid) (*Commit, error) + func (repos *Repository) LookupReference(name string) (*Reference, error) + func (repos *Repository) LookupTag(oid *Oid) (*Tag, error) + func (repos *Repository) LookupTree(oid *Oid) (*Tree, error) + type SHA1 [20]byte + type Signature struct + Email string + Name string + When time.Time + type Tag struct + Message string + Name string + Tagger *Signature + TargetId *Oid + Type TagType + type TagType int + const TagCommit + type Tree struct + Oid *Oid + TreeEntries []*TreeEntry + func (t *Tree) Walk(callback TreeWalkCallback) error + type TreeEntry struct + Filemode int + Id *Oid + Name string + Type ObjectType + type TreeWalkCallback func(string, *TreeEntry) int