git

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsDir added in v0.4.0

func AbsDir() (string, error)

func CommentChar

func CommentChar() string

func Config

func Config(name string) (string, error)

func CurrentBranch added in v0.4.0

func CurrentBranch() (string, error)

func GitDir

func GitDir() (string, error)

func GitEditor

func GitEditor() (string, error)

func IsGitDir added in v0.6.0

func IsGitDir(dir string) bool

func IsGitDirReverseTop added in v0.6.0

func IsGitDirReverseTop() (bool, error)

func Root added in v0.4.0

func Root() (string, error)

Types

type Client

type Client interface {
	RemoteInfos() ([]*RemoteInfo, error)
	CurrentRemoteBranch() (string, error)
}

func NewGitClient

func NewGitClient() Client

type Editor

type Editor struct {
	Program string
	Topic   string
	File    string
	Message string
	CS      string
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(filePrefix, topic, message string, editFunc func(program, file string) error) (editor *Editor, err error)

func (*Editor) DeleteFile

func (e *Editor) DeleteFile() error

func (*Editor) EditTitleAndDescription

func (e *Editor) EditTitleAndDescription() (title, body string, err error)

type GitClient

type GitClient struct {
	Client
}

func (*GitClient) CurrentRemoteBranch added in v0.4.0

func (g *GitClient) CurrentRemoteBranch() (string, error)

func (*GitClient) RemoteInfos

func (g *GitClient) RemoteInfos() ([]*RemoteInfo, error)

type MockClient

type MockClient struct {
	MockRemoteInfos         func() ([]*RemoteInfo, error)
	MockCurrentRemoteBranch func() (string, error)
}

func (*MockClient) CurrentRemoteBranch added in v0.4.0

func (m *MockClient) CurrentRemoteBranch() (string, error)

func (*MockClient) RemoteInfos

func (m *MockClient) RemoteInfos() ([]*RemoteInfo, error)

type RemoteInfo

type RemoteInfo struct {
	Remote     string
	Domain     string
	Group      string
	SubGroup   string
	Repository string
}

func NewRemoteInfo

func NewRemoteInfo(remote, url string) *RemoteInfo

func (*RemoteInfo) ApiUrl

func (r *RemoteInfo) ApiUrl() string

func (*RemoteInfo) BaseUrl

func (r *RemoteInfo) BaseUrl() string

func (*RemoteInfo) BranchFileWithLine added in v0.4.0

func (r *RemoteInfo) BranchFileWithLine(branch string, path string, line string) string

func (*RemoteInfo) BranchPath added in v0.4.0

func (r *RemoteInfo) BranchPath(branch string, path string) string

func (*RemoteInfo) BranchUrl

func (r *RemoteInfo) BranchUrl(branch string) string

func (*RemoteInfo) RepositoryFullName

func (r *RemoteInfo) RepositoryFullName() string

func (*RemoteInfo) RepositoryUrl

func (r *RemoteInfo) RepositoryUrl() string

func (*RemoteInfo) Subpage added in v0.4.0

func (r *RemoteInfo) Subpage(subpage string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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