Exemplo n.º 1
0
Arquivo: cmds.go Projeto: hiroapp/cli
func cmdRm(d db.DB, id string) {
	entry, err := ById(d, id)
	if err != nil {
		fatal(err)
	} else if err := d.Remove(id); err != nil {
		fatal(err)
	}
	categories, err := d.Categories()
	if err != nil {
		fatal(err)
	}
	FprintEntry(os.Stdout, entry, categories.Path(entry.CategoryID), PrintDefault)
}