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.`,
|
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
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue