gitutil

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gitutil provides helper methods for git

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitUtil

type GitUtil struct {
	Repository *git.Repository
}

GitUtil struct

func New

func New(folder string) (*GitUtil, error)

New GitUtil struct and open git repository

func (*GitUtil) GetBranch

func (g *GitUtil) GetBranch() (string, error)

GetBranch from git HEAD

func (*GitUtil) GetCommits

func (g *GitUtil) GetCommits(lastTagHash *plumbing.Reference) ([]shared.Commit, error)

GetCommits from git hash to HEAD

func (*GitUtil) GetHash

func (g *GitUtil) GetHash() (string, error)

GetHash from git HEAD

func (*GitUtil) GetLastVersion

func (g *GitUtil) GetLastVersion() (*semver.Version, *plumbing.Reference, error)

GetLastVersion from git tags

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL