From 14c7f9353a3d823449ea2b23b91eaa7353552c3d Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 21 Oct 2019 14:59:39 -0400 Subject: [PATCH] Move exit helper func above first build target --- mage.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mage.go b/mage.go index ff15790..5fd0f28 100644 --- a/mage.go +++ b/mage.go @@ -78,6 +78,14 @@ func getRemotePackages() error { return nil } +// proper error reporting and exit code +func exit(err error) { + if err != nil { + fmt.Fprintf(os.Stderr, "%+v\n", err) + os.Exit(1) + } +} + // Build kbtui with emoji lookup support func BuildEmoji() error { mg.Deps(getRemotePackages) @@ -100,14 +108,6 @@ func BuildEmoji() error { return nil } -// proper error reporting and exit code -func exit(err error) { - if err != nil { - fmt.Fprintf(os.Stderr, "%+v\n", err) - os.Exit(1) - } -} - // Build kbtui with just the basic commands. func Build() { mg.Deps(getRemotePackages)