~ewintr/gte

d264ed0040879ec9657704c0c7921e8c3cf17666 — Erik Winter 3 months ago 529b24a
less output for done and update
M cmd/cli/command/done.go => cmd/cli/command/done.go +1 -1
@@ 41,5 41,5 @@ func (d *Done) Do() string {
		return format.FormatError(err)
	}

	return "message sent\n"
	return ""
}

M cmd/cli/command/empty.go => cmd/cli/command/empty.go +1 -1
@@ 7,5 7,5 @@ func NewEmpty() (*Empty, error) {
}

func (cmd *Empty) Do() string {
	return "did nothing\n"
	return "did nothing\n\n"
}

M cmd/cli/command/fetch.go => cmd/cli/command/fetch.go +1 -1
@@ 34,5 34,5 @@ func (s *Fetch) Do() string {
		return format.FormatError(err)
	}

	return fmt.Sprintf("fetched %d tasks\n", result.Count)
	return fmt.Sprintf("fetched %d tasks\n\n", result.Count)
}

M cmd/cli/command/folder.go => cmd/cli/command/folder.go +1 -1
@@ 51,7 51,7 @@ func (f *Folder) Do() string {
	}

	if len(res.Tasks) == 0 {
		return "no tasks here\n"
		return "no tasks here\n\n"
	}

	return format.FormatTaskTable(res.Tasks)

M cmd/cli/command/inbox.go => cmd/cli/command/inbox.go +1 -1
@@ 28,5 28,5 @@ func (i *Inbox) Do() string {
		return format.FormatError(err)
	}

	return fmt.Sprintf("processed %d tasks\n", res.Count)
	return fmt.Sprintf("processed %d tasks\n\n", res.Count)
}

M cmd/cli/command/project.go => cmd/cli/command/project.go +1 -1
@@ 38,7 38,7 @@ func (p *Project) Do() string {
	}

	if len(res.Tasks) == 0 {
		return "no tasks here\n"
		return "no tasks here\n\n"
	}

	return format.FormatTaskTable(res.Tasks)

M cmd/cli/command/projects.go => cmd/cli/command/projects.go +2 -2
@@ 35,7 35,7 @@ func (p *Projects) Do() string {
	}

	if len(projects) == 0 {
		return "no projects here\n"
		return "no projects here\n\n"
	}

	var out string


@@ 45,5 45,5 @@ func (p *Projects) Do() string {
		}
	}

	return out
	return fmt.Sprintf("%s\n", out)
}

M cmd/cli/command/recur.go => cmd/cli/command/recur.go +1 -1
@@ 39,5 39,5 @@ func (r *Recur) Do() string {
		return format.FormatError(err)
	}

	return fmt.Sprintf("generated %d tasks\n", res.Count)
	return fmt.Sprintf("generated %d tasks\n\n", res.Count)
}

M cmd/cli/command/send.go => cmd/cli/command/send.go +1 -1
@@ 32,5 32,5 @@ func (s *Send) Do() string {
		return format.FormatError(err)
	}

	return fmt.Sprintf("sent %d tasks\n", count)
	return fmt.Sprintf("sent %d tasks\n\n", count)
}

M cmd/cli/format/format.go => cmd/cli/format/format.go +2 -2
@@ 33,7 33,7 @@ func FormatTaskTable(tasks []*task.LocalTask) string {
		output += fmt.Sprintf("%d%s\t%s\t%s (%s)\n", t.LocalId, updateStr, t.Due.String(), t.Action, t.Project)
	}

	return output
	return fmt.Sprintf("%s\n", output)
}

func FormatTask(t *task.LocalTask) string {


@@ 46,7 46,7 @@ due:     %s
		output += fmt.Sprintf("recur:%s", t.Recur.String())
	}

	return output
	return fmt.Sprintf("%s\n", output)
}

func ParseTaskFieldArgs(args []string) (*task.LocalUpdate, error) {

M cmd/cli/main.go => cmd/cli/main.go +1 -1
@@ 25,5 25,5 @@ func main() {
		fmt.Println(err, "could not initialize command")
		os.Exit(1)
	}
	fmt.Printf("%s\n", cmd.Do())
	fmt.Printf("%s", cmd.Do())
}