From 71caaf434e4c507b6c3f18f1a0a9b49401b8f641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 19 Jun 2015 00:07:01 +0200 Subject: [PATCH] Reorder funcs --- cmd/fdroidcl/show.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/fdroidcl/show.go b/cmd/fdroidcl/show.go index 1d8f328..83deb46 100644 --- a/cmd/fdroidcl/show.go +++ b/cmd/fdroidcl/show.go @@ -21,6 +21,19 @@ func init() { cmdShow.Run = runShow } +func runShow(args []string) { + apps := findApps(args) + for i, app := range apps { + if app == nil { + log.Fatalf("Could not find app with ID '%s'", args[i]) + } + if i > 0 { + fmt.Printf("\n--\n\n") + } + printAppDetailed(*app) + } +} + func findApps(ids []string) []*fdroidcl.App { index := mustLoadIndex() apps := make(map[string]*fdroidcl.App, len(index.Apps)) @@ -36,19 +49,6 @@ func findApps(ids []string) []*fdroidcl.App { return result } -func runShow(args []string) { - apps := findApps(args) - for i, app := range apps { - if app == nil { - log.Fatalf("Could not find app with ID '%s'", args[i]) - } - if i > 0 { - fmt.Printf("\n--\n\n") - } - printAppDetailed(*app) - } -} - func printAppDetailed(app fdroidcl.App) { p := func(title string, format string, args ...interface{}) { if format == "" {