Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromFile ¶
FromFile loads and returns the contents of a given file. If - is passed through, much like git, it will read from stdin. This can be piped data, unless there is a tty in which case the user will be prompted to enter a message.
func LaunchEditor ¶
func LaunchEditor(repo repository.Repo, fileName string) (string, error)
LaunchEditor launches the default editor configured for the given repo. This method blocks until the editor command has returned.
The specified filename should be a temporary file and provided as a relative path from the repo (e.g. "FILENAME" will be converted to ".git/FILENAME"). This file will be deleted after the editor is closed and its contents have been read.
This method returns the text that was read from the temporary file, or an error if any step in the process failed.
Types ¶
This section is empty.