Documentation ¶
Index ¶
- Variables
- type GitCommitConfig
- type GitConfig
- type GitProvider
- type GoGit
- func (g GoGit) Add(dirPath, filePath string) (err error)
- func (g GoGit) Clone(repo *remote.RepoT) (err error)
- func (g GoGit) CommitWithBranch(dirPath string, commit *GitCommitConfig) (hash, status string, err error)
- func (g GoGit) PushAll(dirPath, remote, branchName string) (err error)
- func (g GoGit) SetBase(ppath string) (err error)
- func (g GoGit) SetClient(c *http.Client) error
- func (g GoGit) Status(dirPath string) (dirty bool, statusString string, err error)
- type StripeList
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDirExists = errors.New("dir exists")
Functions ¶
This section is empty.
Types ¶
type GitCommitConfig ¶
type GitConfig ¶
type GitConfig struct { Provider string BasePath string *GitCommitConfig AddPaths *remote.MatchTextSpec AddContent *remote.MatchTextSpec StripeList StripeList }
type GitProvider ¶
type GitProvider interface { SetBase(ppath string) (err error) SetClient(client *http.Client) (err error) Clone(repo *remote.RepoT) (err error) // Path to repo (name), this will be used by the FmtConfig.Commands and FmtConfig.Target Status(dirPath string) (dirty bool, gitStatus string, err error) Add(dirPath string, filePath string) (err error) CommitWithBranch(dirPath string, commit *GitCommitConfig) (hash, status string, err error) PushAll(dirPath, remoteUrl, branchName string) (err error) }
type GoGit ¶
type GoGit struct {
BasePath string
}
func (GoGit) CommitWithBranch ¶
func (g GoGit) CommitWithBranch(dirPath string, commit *GitCommitConfig) (hash, status string, err error)
type StripeList ¶
type StripeList []string
TODO: StripeList A stripelist is a list of regex strings (MustCompile), that must yield named matches "OWNER" and "REPO". After fmting, all dirty files (white/blacklist agnostic) will be matched against this regex. Resulting OWNER/REPO results will be forwarded to the repo service for fetching. This lets you exclude changes against, say, vendor/ directories in your commit, and instead track down those sources for formatting themselves. eg. M\s*(|\/)vendor\/github\.com\/(?P<OWNER>\w*)\/(?P<REPO>[\w-]*\b) https://regex101.com/r/BweS5r/2
Click to show internal directories.
Click to hide internal directories.