~kdsch/invoicer

e2f034036c4c7e0f84ff34678c7346ba61404577 — Karl Schultheisz 4 years ago 5fac32c
spunkier error messages
1 files changed, 3 insertions(+), 3 deletions(-)

M main.go
M main.go => main.go +3 -3
@@ 15,7 15,7 @@ func usage(msg string) error {
func app() error {
	args := os.Args[1:]
	if len(args) < 1 {
		return usage("Please give me a command.")
		return usage("How can I help you?")
	}

	addr := "db"


@@ 46,7 46,7 @@ func app() error {

	case "report":
		if len(args) < 2 {
			return usage("Please give me an invoice ID.")
			return usage("What invoice ID should I use?")
		}

		db, err := sql.Open("sqlite3", addr)


@@ 63,7 63,7 @@ func app() error {
		return r.save("invoice.html")
	}

	return usage("I don't know that command.")
	return usage("That's not exactly a real command.")
}

func main() {