Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶ added in v1.13.9
type Editor struct { Program string File string Launch func() error // contains filtered or unexported fields }
Editor can be used to allow the user to directly edit content using their default IDE (set via `git var GIT_EDITOR`).
func NewEditor ¶ added in v1.13.9
NewEditor creates a new Editor instance, which can be used to launch the file with the user's default IDE. Accepts the name for the file.
func NewTemporaryFileEditor ¶ added in v1.13.9
NewTemporaryFileEditor creates a new Editor instance, which can be used to launch a temporary file (containing the content that is passed into NewTemporaryFileEditor) with the user's default IDE. Accepts the name for the temporary file, and the file content. The name of the file will have a random string appended, or if an empty string is provided, the name will just be that random string. If the filename string includes a "*", the random string replaces the last "*".
func (*Editor) EditContent ¶ added in v1.13.9
EditContent launches git's default IDE and waits for the temporary file to be saved & closed before returning the edited file content.
type Operations ¶
type Operations struct{}
Operations contains the behaviors of the internal git package
func (Operations) Clone ¶
func (g Operations) Clone(appCachePath, app string) error
Clone clones a repo locally, returns an error if it fails
func (Operations) Pull ¶
func (g Operations) Pull(appCachePath string) error
Pull will update the changes for the provided repo or fails