Add delete view
This commit is contained in:
parent
cb6c12354a
commit
e2c59d5f28
3 changed files with 26 additions and 5 deletions
|
|
@ -58,3 +58,8 @@ func LoadNote(title string) (*Note, error) {
|
|||
}
|
||||
return &Note{Title: title, Body: body}, nil
|
||||
}
|
||||
|
||||
func DeleteNote(title string) error {
|
||||
filename := filepath.Join(conf.Conf.NotesDir, fmtPath(title))
|
||||
return os.Remove(filename)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue