input

package
v0.0.0-...-be47510 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFile

func FromFile(fileName string) (string, error)

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.

Jump to

Keyboard shortcuts

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