Edit the new zettel and commit the changes

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-09-26 12:17:37 +01:00
parent b2f7f7af7f
commit a344f7a913
2 changed files with 5 additions and 3 deletions

View file

@ -20,13 +20,11 @@ This application is a tool to generate the needed files
to quickly create a Cobra application.`, to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
title := "" title := ""
if len(args) > 0 { if len(args) > 0 {
title = strings.Join(args, " ") title = strings.Join(args, " ")
} }
lib.CreateZet(title) lib.CreateZet(title)
// TODO: Edit the file
// TODO: Commit the changes
}, },
} }

View file

@ -37,6 +37,10 @@ func CreateZet(title string) {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
EditFile(filePath)
onSave(zid)
} }
func EditZet(id int) { func EditZet(id int) {