MCPcopy Index your code
hub / github.com/git-bug/git-bug / LaunchEditorWithTemplate

Function LaunchEditorWithTemplate

commands/input/input.go:23–30  ·  view source on GitHub ↗

LaunchEditorWithTemplate will launch an editor as LaunchEditor do, but with a provided template.

(repo repository.RepoCommonStorage, fileName string, template string)

Source from the content-addressed store, hash-verified

21// LaunchEditorWithTemplate will launch an editor as LaunchEditor do, but with a
22// provided template.
23func LaunchEditorWithTemplate(repo repository.RepoCommonStorage, fileName string, template string) (string, error) {
24 err := util.WriteFile(repo.LocalStorage(), fileName, []byte(template), 0644)
25 if err != nil {
26 return "", err
27 }
28
29 return LaunchEditor(repo, fileName)
30}
31
32// LaunchEditor launches the default editor configured for the given repo. This
33// method blocks until the editor command has returned.

Callers 4

BugCreateEditorInputFunction · 0.92
BugCommentEditorInputFunction · 0.92
BugTitleEditorInputFunction · 0.92
QueryEditorInputFunction · 0.92

Calls 2

LaunchEditorFunction · 0.85
LocalStorageMethod · 0.65

Tested by

no test coverage detected