From d97233e3899674abdc56881673bb4a07ad23387e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 3 Apr 2012 10:06:32 -0400 Subject: [PATCH] Pull flags in main.go out to the top level --- main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 07d97b2..3618657 100644 --- a/main.go +++ b/main.go @@ -18,11 +18,13 @@ import ( "strings" ) +var ( + configPath = flag.String("config", "~/.armadillo", "Path to the configuration file") + jailRoot = flag.String("jail", "", "Restrict file operations to this directory root") + port = flag.Int("port", 0, "Port to run the server on") +) + func main() { - // Set up the basic flags. - var configPath *string = flag.String("config", "~/.armadillo", "Path to the configuration file") - var jailRoot *string = flag.String("jail", "", "Restrict file operations to this directory root") - var port *int = flag.Int("port", 0, "Port to run the server on") flag.Parse() // Load the configuration file, if it is present. -- 2.43.5