Edit the new zettel and commit the changes
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
b2f7f7af7f
commit
a344f7a913
2 changed files with 5 additions and 3 deletions
|
@ -20,13 +20,11 @@ This application is a tool to generate the needed files
|
|||
to quickly create a Cobra application.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
title := ""
|
||||
|
||||
if len(args) > 0 {
|
||||
title = strings.Join(args, " ")
|
||||
}
|
||||
|
||||
lib.CreateZet(title)
|
||||
|
||||
// TODO: Edit the file
|
||||
// TODO: Commit the changes
|
||||
},
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ func CreateZet(title string) {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
EditFile(filePath)
|
||||
|
||||
onSave(zid)
|
||||
}
|
||||
|
||||
func EditZet(id int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue