aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-26 18:02:11 +0900
committerOphestra <cat@gensokyo.uk>2025-02-26 18:02:11 +0900
commit56539d8db5f9ce965190d36aac9867907359a7d0 (patch)
tree66c9c6f4e447cd8f5482959d330a1f543e47714a
parent840ceb615ae1fb6affcbe0a5774a5f4ca9d3c303 (diff)
fortify: move internal commands up
This improves readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index 3d3e4796..c3590f35 100644
--- a/main.go
+++ b/main.go
@@ -78,6 +78,10 @@ func buildCommand(out io.Writer) command.Command {
Flag(&flagVerbose, "v", command.BoolFlag(false), "Print debug messages to the console").
Flag(&flagJSON, "json", command.BoolFlag(false), "Serialise output as JSON when applicable")
+ // internal commands
+ c.Command("shim", command.UsageInternal, func([]string) error { shim.Main(); return errSuccess })
+ c.Command("init", command.UsageInternal, func([]string) error { init0.Main(); return errSuccess })
+
c.Command("app", "Launch app defined by the specified config file", func(args []string) error {
if len(args) < 1 {
log.Fatal("app requires at least 1 argument")
@@ -278,10 +282,6 @@ func buildCommand(out io.Writer) command.Command {
return errSuccess
})
- // internal commands
- c.Command("shim", command.UsageInternal, func([]string) error { shim.Main(); return errSuccess })
- c.Command("init", command.UsageInternal, func([]string) error { init0.Main(); return errSuccess })
-
return c
}