Exemple #1
0
func deleteEntry(project *data.Project) (err error) {
	for i, entry := range project.Entries() {
		if i == theIdx {
			return data.Destroy(entry)
		}
	}
	return
}
Exemple #2
0
func deleteProject(project *data.Project) (err error) {
	var remove string
	fmt.Printf(
		"Remove all data for project \"%s\" ([No]/yes)? ",
		project.GetName(),
	)

	if fmt.Scanln(&remove); remove == "yes" {
		err = data.Destroy(project)
	}
	return
}