gitStatus

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: GPL-3.0 Imports: 6 Imported by: 1

README

Package that gets status (added/deleted/modified/etc...) from a GIT repository.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitStatus

type GitStatus struct {
}

GitStatus : Checks the status of a Git repository

func (*GitStatus) GetStatus

func (g *GitStatus) GetStatus(path string) (*GitStatusInfo, error)

GetStatus : Gets the status of a Git repository

type GitStatusInfo

type GitStatusInfo struct {
	// contains filtered or unexported fields
}

GitStatusInfo : Contains information about the git status of a repository

func (*GitStatusInfo) Ahead

func (g *GitStatusInfo) Ahead() int

Ahead : Returns the number of commits the repository is ahead of master

func (*GitStatusInfo) Behind

func (g *GitStatusInfo) Behind() int

Behind : Returns the number of commits the repository is behind the master

func (*GitStatusInfo) Branch

func (g *GitStatusInfo) Branch() string

Branch : Returns the name of the current branch

func (*GitStatusInfo) Deleted

func (g *GitStatusInfo) Deleted() int

Deleted : Returns the number of deleted files

func (*GitStatusInfo) IsGit

func (g *GitStatusInfo) IsGit() bool

IsGit : Returns the true if the path is a git repository

func (*GitStatusInfo) Modified

func (g *GitStatusInfo) Modified() int

Modified : Returns the number of modified files

func (*GitStatusInfo) Path

func (g *GitStatusInfo) Path() string

Path : Returns the path to the git repository

func (*GitStatusInfo) Staged

func (g *GitStatusInfo) Staged() int

Staged : Returns the number of staged files

func (*GitStatusInfo) Unmerged

func (g *GitStatusInfo) Unmerged() int

Unmerged : Returns the number of unmerged files

func (*GitStatusInfo) Untracked

func (g *GitStatusInfo) Untracked() int

Untracked : Returns the number of untracked files

type NotGitRepositoryError

type NotGitRepositoryError struct {
	Path string
}

NotGitRepositoryError : The specified path is not a Git repository

func (NotGitRepositoryError) Error

func (e NotGitRepositoryError) Error() string

Jump to

Keyboard shortcuts

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